Ant build tool from Apache

Apache Ant LogoAnt is a scripting tool for automating Java software build process.  The scripting language is based on XML. Ant can be extended using Java classes. The built in tasks in Ant are also implemented as Java classes.

Following is a sample build file,

<project name=”TestProject” default=”dist” basedir=”.”>
  <property name=”src” location=”src”/>
  <property name=”build” location=”build”/>
  <property name=”dist”  location=”dist”/>

  <target name=”init”>
    <mkdir dir=”${build}”/>
  </target>

  <target name=”compile” depends=”init”
        description=”compile the source ” >
    <javac srcdir=”${src}” destdir=”${build}”/>
  </target>

  <target name=”dist” depends=”compile”
        description=”generate the distribution” >
    <mkdir dir=”${dist}/lib”/>
    <jar jarfile=”${dist}/lib/MyProject-${DSTAMP}.jar” basedir=”${build}”/>
  </target>

</project>

The Ant Manual gives a complete overview of this tool.