dev.kanngard.net make sure you visit my new blog at: johankanngard.net

Common Ant build file and sample build file

by Johan Känngård / [Java] / 2004-04-22 / #2


I've always copied a template Ant build file to get the functionality I wanted in the Ant files, but after reading "ANT's finally a real build tool" (alternate) by Mike Spille, I have now created a common build file, that is used in all my projects. The file is attached to this "article", put it in your projects parent directory, and create a simple build.xml that you put into your project catalog like this:

root
|_ build_common.xml
|_ MyProject1
|  |_ build.xml
|_ MyProject2
   |_ build.xml

To use it, just open a bash or DOS window, and call Ant from the project directory. Since I just started using this "import" style, the files could contain errors, so let me know if you find any.

Updated the build_common.xml with a dist target and some bug fixes. The original file is named build_common_1.0.xml, and the new is build_common.xml.

Updated the build_common.xml, a bugfix for the jar target.



Floppy icon build_template.xml1 Kb
Floppy icon build_common_1.0.xml5 Kb
Floppy icon build_common_1.1.xml7 Kb
Floppy icon build_common.xml7 Kb