<?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.
-->

<document>
  <properties>
    <title>Subversion</title>
    <author email="hps@intermeta.de">Henning P. Schmiedehausen</author>
    <author email="fischer@seitenbau.de">Thomas Fischer</author>
  </properties>

  <body>
   <section name="Torque Source code management">
     <p>
      Up to release 3.1.1, Torque used CVS as its source code
      repository. Most of the older releases still point to the CVS
      repository at cvs.apache.org. During the 3.2 development cycle,
      the Torque team (with a few well-meant nudges from the Apache
      Software Foundation infrastructure team) decided to move the
      Torque source code from CVS to <a
      href="http://subversion.tigris.org">Subversion</a>.
    </p>

    <p>
      If you have never worked with Subversion before, please take a
      look at <a href="http://svnbook.red-bean.com/">the free
      subversion book</a> and also at <a
      href="http://www.apache.org/dev/version-control.html">Source
      code repositories at the Apache Software Foundation</a> to get
      more information.
    </p>
   </section>

   <section name="The Torque repository">
    <p>
     Unlike some other repositories you might know, Torque makes some
     use of the <a
     href="http://svnbook.red-bean.com/en/1.1/ch07s04.html">svn:externals</a>
     feature of Subversion to organize its tree. This might lead to
     some &quot;gotchas&quot;, so be warned.
    </p>

    <subsection name="Torque Repository Structure">

      <p>
        Here is what the Torque directory structure looks like in SVN:
      </p>

      <source><![CDATA[
    db/torque/
      common           <--- contains files common to all components.
                            Referenced by svn:externals
      runtime          <--- contains the runtime component
      generator        <--- contains the generator component
      templates        <--- contains the generator templates component
      maven-plugin     <--- contains the maven plugin component
      maven2-plugin    <--- contains the maven 2 plugin component
      test             <--- contains the test component
      trunks           <--- contains references to the trunks of all 
                            component (via svn:externals)
      site             <--- contains the "frame" of the sources of the
                            homepage (everything not related to a specific 
                            component)
      branches         <--- old branches (pre-3.2)
      tags             <--- old tags (pre-3.2)
      ]]></source>
    </subsection>

    <subsection name="Torque Components">
     <p>
      Torque contains the following components:

      <table>
       <tr><th>Component</th><th>Trunk repository location</th></tr>

       <tr><td>Runtime</td>       <td><a href="http://svn.apache.org/viewcvs/db/torque/runtime/trunk/">http://svn.apache.org/repos/asf/db/torque/runtime/trunk</a></td></tr>
       <tr><td>Generator</td>     <td><a href="http://svn.apache.org/viewcvs/db/torque/generator/trunk/">http://svn.apache.org/repos/asf/db/torque/generator/trunk/</a></td></tr>
       <tr><td>Templates</td>     <td><a href="http://svn.apache.org/viewcvs/db/torque/templates/trunk/">http://svn.apache.org/repos/asf/db/torque/templates/trunk/</a></td></tr>
       <tr><td>Maven 1 Plugin</td><td><a href="http://svn.apache.org/viewcvs/db/torque/maven-plugin/trunk/">http://svn.apache.org/repos/asf/db/torque/maven-plugin/trunk/</a></td></tr>
       <tr><td>Maven 2 Plugin</td><td><a href="http://svn.apache.org/viewcvs/db/torque/maven2-plugin/trunk/">http://svn.apache.org/repos/asf/db/torque/maven2-plugin/trunk/</a></td></tr>
       <tr><td>Site</td>          <td><a href="http://svn.apache.org/viewcvs/db/torque/site/trunk/">http://svn.apache.org/repos/asf/db/torque/site/trunk/</a></td></tr>
       <tr><td>Common</td>        <td><a href="http://svn.apache.org/viewcvs/db/torque/common/trunk/">http://svn.apache.org/repos/asf/db/torque/common/trunk/</a></td></tr>
       <tr><td>Test</td>          <td><a href="http://svn.apache.org/viewcvs/db/torque/test/trunk/">http://svn.apache.org/repos/asf/db/torque/test/trunk/</a></td></tr>
      </table>
     </p>
    </subsection>

    <subsection name="Runtime, Generator, Templates, Maven 1 Plugin, Maven 2 Plugin">
     <p>
      These modules make up the main torque distribution. They
      are released in regular intervals and are available as binary
      and source distributions from <a href="../download.html">the
      Torque download page</a>. Each of these modules is developed
      on its own Subversion trunk; Tags and Branches are located in
      the respective <code>.../tags</code> and <code>.../branches</code> 
      subdirectories.
     </p>
    </subsection>

    <subsection name="Common">
     <p>
      The common module is a special module because it contains files
      that are needed in all main modules of the Torque source
      tree. Every module pulls it into its source tree through an
      external reference and references the files in the common module
      as <code>/common/...</code> <br/>
      Please be aware that every change
      inside this module influences the build process of all the
      Torque modules!.
     </p>
    </subsection>
    <subsection name="Test project">
     <p>
      The test project is used by Torque developers to test the functionality
      of Torque. See the <a href="test-project.html">test guide</a> 
      for an explanation of how to run the tests.
     </p>
    </subsection>
    <subsection name="Site">
     <p>
      The Torque site contains the information global to all Torque
      releases such as main navigation, download page or the page
      you're currently reading.
     </p>
    </subsection>
   </section>

   <section name="Old CVS tags and branches">
    <p>
     All CVS tags and branches that existed before the conversion to Subversion have
     been preserved. These are only for historic reasons and there will be no more
     development here. Branches and Tags after the Subversion conversion will be located
     in the module specific branches/ and tags/ directories.

     <ul>
      <li>
        <a href="http://svn.apache.org/viewcvs/db/torque/tags/">Old CVS Tags</a> 
        -- http://svn.apache.org/repos/asf/db/torque/tags/
      </li>
      <li>
        <a href="http://svn.apache.org/viewcvs/db/torque/branches/">Old CVS Branches</a>
        -- http://svn.apache.org/repos/asf/db/torque/branches/
      </li>
     </ul>
     </p>
   </section>

   <section name="The trunks module">
    <p>
     The Torque subversion repository contains another module for
     development called <i>trunks</i>. While
     this module seems quite empty, it is not.<br/>
     If you want to work on the Torque code base, your best guess will be to
     check out this module using

     <source><![CDATA[svn checkout http://svn.apache.org/repos/asf/db/torque/trunks torque]]></source>

     The resulting directory will contain the trunk locations of all
     main Torque parts. This also happens through svn:external
     references.
    </p>
   </section>

   <section name="Multi-Project build">
    <p>
     The <i>trunks</i> module also contains a <a
     href="http://maven.apache.org/reference/plugins/multiproject/">Multi-Project</a>
     build environment to build all the major parts of Torque in one
     go.<br/>
     If you checked out the <i>trunks</i> module from subversion, you can run one of
     the following goals inside the resulting directory:

     <ul>
      <li>
        build -- Builds all parts of Torque
      </li>
      <li>
        install - Builds all parts of Torque and installs the resulting jars
        and plugins into your local maven repository
      </li>
      <li>
        site -- Builds the documentation sites for all parts of Torque
      </li>
     </ul>
    </p>
   </section>
  </body>
</document>
