Samuel Kroslak’s blog

Sample Ant script for small projects

leave a comment »

I don’t know yet how to put there ant code in a way that it will not conflict with wordpress tags, so build file is attached here:
build.xml

This script is assuming that you follow some basic conventions. You need to do only 2 things to adapt it to your project.

  1. change project name to your project name in 1st line of script
  2. set path to your main class in “mainClass” property.

Then you are ready to go. Assuming you have all your source files and resources in ’src’ folder and dependent libraries in ‘lib’ folder, script can generate .jar file (including libraries), javadoc and some stuff around those.

I was searching for something similar and universal to use in my small projects and I didn’t find anything like that, so I created it myself.


Written by Samuel Kroslak

December 15, 2007 at 19:07

Posted in Java

Tagged with ,

Leave a Reply