<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 -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
</target>
<target name="package" depends="compile">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<jar jarfile="${dist}/lib/MyTasks-${DSTAMP}.jar"
basedir="${build}"/>
</target>
<target name="install" depends="package">
<echo>
Copying jar file to ant distribution.
</echo>
<copy file="${dist}/lib/MyTasks-${DSTAMP}.jar"
tofile="${install}/MyTasks.jar"/>
</target>
</project>