Development

This is supposed to give some ideas on how JaxoDraw is developed.

Quick start - Building the sources

You need Subversion to checkout the source code:

svn checkout svn://svn.code.sf.net/p/jaxodraw/code/trunk/ jaxodraw-trunk

To build the program you need Apache Maven 3:

mvn clean install

If you run this from the main checkout directory jaxodraw-trunk, it will build the program and all its Sub-Projects. If you want to build the main program only, execute the same command from the jaxodraw directory.

Further build options are listed in the JaxoDraw User Guide.

Source code

We generally try to stick to the official Java Code Conventions. In addition to that, we apply points number 3, 4 and 5 of the conventions outlined by the Apache Turbine project.

Formatting

The formatting of the JaxoDraw source code can be checked with the Maven checkstyle-plugin. On the command line:

mvn checkstyle:checkstyle

or to generate a report as part of the site:

mvn -Preporting clean site

(this will run a bunch of other reports as well).

Build process

The build process is automated by Maven (see below).

A few considerations:

  • Separation of source files from all generated files: it should be possible to clean up by simply removing the target/ directory.
  • Design to ease the packaging: related files should be put in the same directories. For instance: all the licenses go into doc/legal/ (and only the licenses), so if we add another license, no package script has to be rewritten because the whole directory is included.
  • Proposition: create jar files instead of tar.gz for distribution. Reason: winzip and other unzip utilities have problems with long file names and empty directories in tar archives. A jar is not much bigger than a tar.gz.

Maven

To compile the JaxoDraw source code you have to install Apache Maven. Check the installation and compilation instructions in the JaxoDraw User Guide.