Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2008-06-26 12:26:05
Size: 1978
Editor: kfc
Comment: Created by the PackagePages action.
Revision 4 as of 2010-03-17 13:12:46
Size: 2655
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
We use Ant 1.7 We use Ant 1.7.1

== Project Build File ==

Each project must include an Ant {{{build.xml}}} file capable of building the entire project.

The {{{build.xml}}} file must include the following targets:


 * '''all''' (default target)
  . Must depend on {{{release}}}. If the module contains anything not distributed with {{{release}}} target that must be build as well. As a rule of thumb this target should ''"do what I need"''.
 * '''clean'''
  . Delete all compiled Java classes bu recursively calling clean targets in modules
 * '''compile'''
  . Compile all Java classes by recursively calling compile targets in modules
 * '''distclean'''
  . Restore module to Subversion status - ie. remove all non version controlled files by recursively calling distclean targets in modules
 * '''doc'''
  . Compile Java doc and other documentation.
 * '''release'''
  . Compile a module release as specified in the [[ModuleReleaseStructure| module release structure]]. ''This target must depend on'' {{{distclean}}}, {{{release.bin}}}, {{{release.doc}}}, and {{{release.src}}}
 * '''release.bin'''
  . Create a binary release. Distribution packages should go into the {{{dist/}}} directory. See [[ModuleReleaseStructure| module release structure]].
 * '''release.doc'''
  . Create a Javadoc distribution of the module. Distribution packages should go into the {{{dist/}}} directory. See [[ModuleReleaseStructure| module release structure]].
 * '''release.src'''
  . Create a source distribution of the module. Distribution packages should go into the {{{dist/}}} directory. See [[ModuleReleaseStructure| module release structure]].
 * '''test'''
  . Run all unit tests by recursively calling test targets in all modules
 * '''war'''
  . Optional. Create a war file for the project
Line 12: Line 42:
 * '''all''' (default target)
  . Must depend on {{{release}}}. If the module contains anything not distributed with {{{release}}} target that must be build as well. As a rule of thumb this target should ''"do what I need"''.
Line 16: Line 44:
 * '''distclean'''
  . Restore module to Subversion status - ie. remove all non version controlled files
 * '''depends'''
  . Run the jar targets in all depending modules
Line 18: Line 50:
 * '''distclean'''
  . Restore module to Subversion status - ie. remove all non version controlled files
 * '''doc'''
  . Compile Java doc and other documentation.
Line 23: Line 51:
  . Roll {{{.jar}}} file(s) from compiled classes. Compiled jar files should go into the {{{lib/}}} directory.
 * '''release'''
  . Compile a module release as specified in the [:ModuleReleaseStructure: module release structure]. ''This target must depend on'' {{{distclean}}}, {{{release.bin}}}, {{{release.doc}}}, and {{{release.src}}}
 * '''release.bin'''
  . Create a binary release. Distribution packages should go into the {{{dist/}}} directory. See [:ModuleReleaseStructure: module release structure].
 * '''release.doc'''
  . Create a Javadoc distribution of the module. Distribution packages should go into the {{{dist/}}} directory. See [:ModuleReleaseStructure: module release structure].
 * '''release.src'''
  . Create a source distribution of the module. Distribution packages should go into the {{{dist/}}} directory. See [:ModuleReleaseStructure: module release structure].
  . Roll {{{.jar}}} file(s) from compiled classes. Compiled jar files should go into the {{{dist/}}} directory.
Line 34: Line 54:

== Global Project Build File ==
At some point (when we want to make releases) we need a global project Ant file. The specification of this has been punted for now.
 * '''war'''
  . Optional. Bundle the module as a webservice.

Ant

We use Ant 1.7.1

Project Build File

Each project must include an Ant build.xml file capable of building the entire project.

The build.xml file must include the following targets:

  • all (default target)

    • Must depend on release. If the module contains anything not distributed with release target that must be build as well. As a rule of thumb this target should "do what I need".

  • clean

    • Delete all compiled Java classes bu recursively calling clean targets in modules
  • compile

    • Compile all Java classes by recursively calling compile targets in modules
  • distclean

    • Restore module to Subversion status - ie. remove all non version controlled files by recursively calling distclean targets in modules
  • doc

    • Compile Java doc and other documentation.
  • release

    • Compile a module release as specified in the module release structure. This target must depend on distclean, release.bin, release.doc, and release.src

  • release.bin

  • release.doc

    • Create a Javadoc distribution of the module. Distribution packages should go into the dist/ directory. See module release structure.

  • release.src

    • Create a source distribution of the module. Distribution packages should go into the dist/ directory. See module release structure.

  • test

    • Run all unit tests by recursively calling test targets in all modules
  • war

    • Optional. Create a war file for the project

Module Build File

Each module must include an Ant build.xml file capable of building the entire module. However the code should be organised to be compilable from IDEA as well as Ant.

The build.xml file must include the following targets:

  • clean

    • Delete all compiled Java classes
  • distclean

    • Restore module to Subversion status - ie. remove all non version controlled files
  • depends

    • Run the jar targets in all depending modules
  • compile

    • Compile all Java classes. Compiled classes should go into the classes/ directory.

  • jar

    • Roll .jar file(s) from compiled classes. Compiled jar files should go into the dist/ directory.

  • test

    • Run all unit tests
  • war

    • Optional. Bundle the module as a webservice.

Ant (last edited 2010-03-17 13:12:46 by localhost)