<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN"
    "http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.dtd">
<document>
  <header>
    <title>Developer Tools</title>
  </header>
  <body>
    <p>This page documents items that may be helpful to other developers, especially to those who are new to FOP. Exhaustive treatment of these topics is better suited to other fora, but the information presented here is intended to deal with FOP-specific issues related to these tools, especially "gotchas", and to help developers get jump-started.</p>
    <section id="general">
      <title>General Developer Information</title>
    <p>See <link href="http://www.apache.org/dev/contributors.html">the Apache Contributors Tech Guide</link> for useful information and links for Apache developers, including help with tools and procedures.</p>
    </section>
    <section id="cvs">
      <title>Concurrent Versions System (CVS)</title>
      <section id="cvs_general">
        <title>General</title>
        <p>Visit <link href="http://xml.apache.org/cvs.html">Apache XML CVS Repositories</link> for useful information.</p>
        <p>You will need a CVS client to be able to gain access to the FOP repository. For general CVS information, visit <link href="http://www.cvshome.org">CVS Home</link>. Nice GUI clients for Windows, Mac, and X(??) can be found at <link href="http://www.wincvs.org">WinCVS</link>.</p>
        <p>Regardless of what platform you develop on, please be sure to submit patches that use Unix line endings. If you are using WinCVS, check code out this way by going to the Admin / Preferences menu item, clicking on the "Globals" tab, then select the "Checkout text files with the Unix LF (0xa)" option. You will also need to use an editor that supports opening and saving files using Unix line endings.</p>
      </section>
      <section id="wincvs_download">
        <title>Step-by-step instructions for downloading FOP using WinCVS</title>
        <ul>
          <li>Select "Create / Checkout Module" menu item.</li>
          <li>“Checkout Settings” Tab:
            <ul>
              <li>“Enter the module name and path on the server:”<br/>
                <code>xml-fop</code>
              </li>
              <li>“Local folder to checkout to:”<br/>Enter your local directory</li>
            </ul>
          </li>
          <li>“Checkout Options” Tab:
          <ul>
              <li>If you are checking out the trunk, unset all options.</li>
              <li>If you are checking out the maintenance branch (currently distributed code), check “By revision/tag/branch:” and enter <code>fop-0_20_2-maintain</code>.</li>
            </ul>
          </li>
          <li>“General” Tab:
          <ul>
              <li>“Enter the CVSROOT:”<br/>
                <code>:pserver:anoncvs@cvs.apache.org:/home/cvspublic</code>
              </li>
              <li>“Authentication:”<br/>
                <code>“passwd” file on the cvs server</code>
              </li>
            </ul>
          </li>
          <li>“Globals” Tab:
          <ul>
              <li>check “Checkout text files with the Unix LF (Oxa)”</li>
            </ul>
          </li>
          <li>Click "OK" and the download should begin.</li>
        </ul>
      </section>
      <section id="cvs_patch">
        <title>Creating Patches</title>
        <ul>
          <li>
            <code>cd</code> to a directory that contains all of the changes that you wish to include in the patch. To comprehend the entire distribution, <code>cd</code> to the directory above the "xml-fop" directory that was created when you checked out the code.</li>
          <li>Run: <code>cvs -q diff -wu &lt;list of items to diff&gt;</code>
            <br/>The &lt;list of items to diff&gt; is a space-separated list of files and directories relative to the current directory that you wish to include in the diff. For example, to include the entire distribution, assuming that you are in the directory, above xml-fop, simply enter "xml-fop". This will recursively go through the directories beneath xml-fop to diff each file.</li>
          <li>If you are running WinCVS, select "Admin/Command Line" for a console in which to key the above command.</li>
          <li>On a Linux/Unix machine, you will want to redirect the output from the above command into a file. If you are using GNU WinCVS, you can cut the output from the console window and paste it into a file. The "-w" ignores whitespace differences. The "-u" puts the diff in "universal" format. You may wish to use the "-N" option as well, which is supposed to treat new files as if there were an old 0 byte file -- in other words, it is supposed to include the new file in the patch. However, it only operates on files that have been "add"ed to the CVS repository, which cannot be done without commit access.</li>
        </ul>
      </section>
    </section>
    <section id="ide">
      <title>Integrated Development Environments (IDEs)</title>
      <p>An IDE is not required, but will generally be found to be helpful, especially for serious debugging and refactoring.</p>
      <p>See <link href="http://jakarta.apache.org/site/idedevelopers.html">the Apache Jakarta IDE Developer's Guide</link> for useful information on Java IDEs.</p>
      <p>Borland's JBuilder 7/8 does not support Ant builds unless you have the Enterprise Edition (which is quite expensive). This causes problems with any code that is generated by the Ant build. First, you must run the Ant build before you can use the IDE. Second, when you are editing in the IDE, you must be editing the generated files, which means that you must make any changes to the source files in another editor. This is less serious for development on the trunk, but in the maintenance branch, all source files were "generated".</p>
      <p>Sun ONE Studio Four does support Ant, but seems to use a built-in version, and as of this writing chokes on the FOP build file, saying that it is not valid. There is awkward because there is no official DTD for Ant, and it may be merely an Ant version issue.</p>
    </section>
  </body>
</document>
