Developer Tools

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.

General Developer Information

See the Apache Contributors Tech Guide for useful information and links for Apache developers, including help with tools and procedures.

Concurrent Versions System (CVS)
General

Visit Apache XML CVS Repositories for useful information.

You will need a CVS client to be able to gain access to the FOP repository. For general CVS information, visit CVS Home. Nice GUI clients for Windows, Mac, and X(??) can be found at WinCVS.

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.

Step-by-step instructions for downloading FOP using WinCVS
  • Select "Create / Checkout Module" menu item.
  • “Checkout Settings” Tab:
    • “Enter the module name and path on the server:”
      xml-fop
    • “Local folder to checkout to:”
      Enter your local directory
  • “Checkout Options” Tab:
    • If you are checking out the trunk, unset all options.
    • If you are checking out the maintenance branch (currently distributed code), check “By revision/tag/branch:” and enter fop-0_20_2-maintain.
  • “General” Tab:
    • “Enter the CVSROOT:”
      :pserver:anoncvs@cvs.apache.org:/home/cvspublic
    • “Authentication:”
      “passwd” file on the cvs server
  • “Globals” Tab:
    • check “Checkout text files with the Unix LF (Oxa)”
  • Click "OK" and the download should begin.
Creating Patches
  • cd to a directory that contains all of the changes that you wish to include in the patch. To comprehend the entire distribution, cd to the directory above the "xml-fop" directory that was created when you checked out the code.
  • Run: cvs -q diff -wu <list of items to diff>
    The <list of items to diff> 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.
  • If you are running WinCVS, select "Admin/Command Line" for a console in which to key the above command.
  • 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.
Integrated Development Environments (IDEs)

An IDE is not required, but will generally be found to be helpful, especially for serious debugging and refactoring.

See the Apache Jakarta IDE Developer's Guide for useful information on Java IDEs.

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

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.