Listing B: Build configuration

<project name="ant_tasks" default="package" basedir=".">
  <!-- set global properties for this build -->
  <property name="src" value="src"/>
  <property name="build" value="build"/>
  <property name="dist"  value="dist"/>
  <property name="install" value="/usr/local/ant/lib"/>

  <target name="init">
    <!-- Create the time stamp -->
    <!-- Create the build directory structure used by compile -->
   <mkdir dir="${build}"/>

  <target name="compile" depends="init">
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}"/>

  <target name="package" depends="compile">
    <!-- Create the distribution directory -->
    <mkdir dir="${dist}/lib"/>
    <jar jarfile="${dist}/lib/MyTasks-${DSTAMP}.jar"

  <target name="install" depends="package">
        Copying jar file to ant distribution.
    <copy file="${dist}/lib/MyTasks-${DSTAMP}.jar"