Java Build System
Published on 30 Jan 2005Tags #Java
This Java build system is based on ant. It comes with a build.xml that contains project configuration variables. This file includes include.xml that defines the available targets.
Changelog:
- 20040522: No need for empty args property for targets test and run anymore, support for Java 1.5
- 00000000: Initial release
How to use this build system:
- Unpack the archive
- Customize
build.xml - Execute
ant init - Place your sources in
src/ - You are ready to go
The directory structure that will be imposed on your project:
src/Source filesbin/Object files with debugging symbolslib/Object files without debugging symbolsdist/Files for distributiondoc/Project documentationapi/API documentation
The targets that are available to you:
init: Initializes the directory structurebuild: Compiles the sources insrc/with debugging symbols and places the objects inbin/rebuild: Removesbin/and calls thebuildtargetapi: Generates the API documentation-
test: Executes the objects frombin/. You may specify theargsproperty which contains command line arguments:ant testant -Dargs="blarg" testant -Dproject.main="package.class" -Dargs="blarg" test dist: Calls targets:dist-build,dist-src,dist-doc,dist-bin,jar,checksumdist-build: Compiles the sources insrc/without debugging symbols and places the objects inlib/dist-src: Creates an archives for the distribution of the sourcesdist-doc: Creates an archive for the distribution of the documentationdist-bin: Creates an archive for the distribution of the objects and documentationjar: Creates a jar file from the objects indist/checksum: Creates MD5 checksums for all files indist/run: Executes the JAR file. The same applies as for thetesttargetclean: Removesbin/andlib/distclean: Removesdist/proper: Calls thecleantarget and removesdoc/api/