<?xml version="1.0" encoding="UTF-8"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
 
 http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.   
-->
<chapter id="download">

  <title>Download Instruction</title>
  
  <section id="download_jar">
    <title>Get the Jar</title>
    <para>
    Slice is available as a single jar and can be downloaded from the following
    location.
    </para>
    
    <table tocentry="1">
        <tgroup rowsep="2" colsep="4" align="center" cols="3">
            <colspec colname="version"/>
            <colspec colname="download"/>
            <colspec colname="note"/>
            <thead>
                <row>
                    <entry colname="version">Version</entry>
                    <entry colname="download">Download</entry>
                    <entry colname="note">Release Notes</entry>
                 </row>
            </thead>
            <tbody>
                <row>
                    <entry colname="version">0.4.0</entry>
                    <entry colname="download"><ulink url="http://svn.apache.org/repos/asf/labs/fluid/slice/openjpa-slice-0.4.0.jar">openjpa-slice-0.4.0.jar</ulink></entry>
                    <entry colname="note"><link linkend="release_notes_0.4.0">Release Note</link></entry>
                </row>
                <row>
                    <entry colname="version">0.3.0</entry>
                    <entry colname="download"><ulink url="http://svn.apache.org/repos/asf/labs/fluid/slice/openjpa-slice-0.3.0.jar">openjpa-slice-0.3.0.jar</ulink></entry>
                    <entry colname="note"><link linkend="release_notes_0.3.0">Release Note</link></entry>
                </row>
                <row>
                    <entry colname="version">0.2.0</entry>
                    <entry colname="download"><ulink url="http://svn.apache.org/repos/asf/labs/fluid/slice/openjpa-slice-0.2.0.jar">openjpa-slice-0.2.0.jar</ulink></entry>
                    <entry colname="note"><link linkend="release_notes_0.2.0">Release Note</link></entry>
                </row>
                <row>
                    <entry colname="version">0.1.0</entry>
                    <entry colname="download"><ulink url="http://svn.apache.org/repos/asf/labs/fluid/slice/openjpa-slice-0.1.0.jar">openjpa-slice-0.1.0.jar</ulink></entry>
                    <entry colname="note"><link linkend="release_notes_0.1.0">Release Note</link></entry>
                </row>
            </tbody>
         </tgroup>
     </table>
    
  </section>
  
  <section id="download_source">
    <title>Source Code Download</title>
    <para>
    Source code is maintained in Apache Subversion Repository.
    The following command will fetch the repository content to 
    local machine, in <code>slice</code> subdirectory relative to the current 
    directory.
    <programlisting>
    svn co https://svn.apache.org/repos/asf/labs/fluid/slice slice
    </programlisting>
    </para>
  </section>
  
  <section id="download_build_source">
    <title>Build from Source</title>
    <para>
    To build the project and run the tests, <ulink url="http://maven.apache.org/">Maven 2.0.x</ulink> is required. 
    The following command will compile the source code, run the tests
    and create a <code>openjpa-slice-{VERSION}.jar</code>.
    <programlisting>
    mvn package
    </programlisting>
    </para>

    <note>
    The test configuration <code>src/test/resources/META-INF/persistence.xml</code> currently 
    assume that two MySQL databases named 
    <code>slice1</code> and <code>slice2</code> are available in <code>localhost</code>. 
    </note>
    
    <para>
    To build the project without running the tests, 
    run the following command
    <programlisting>
    mvn package -Dtest=false
    </programlisting>
    </para>
  </section>
  &homer;
</chapter>
  