1 <project name="shoot" default="dist" basedir=".">
3 <property name="sourceDir" value="src"/>
4 <property name="outputDir" value="classes"/>
5 <property name="distDir" value="dist"/>
6 <property file="version.properties"/>
8 <target name="clean" depends="init">
9 <delete dir="${outputDir}"/>
11 <target name="compile" depends="clean">
12 <mkdir dir="${outputDir}"/>
13 <javac srcdir="${sourceDir}" destdir="${outputDir}"/>
15 <target name="dist" depends="compile">
16 <mkdir dir="${distDir}"/>
17 <delete file="${distDir}/shoot-${version}.jar"/>
18 <delete file="$manifest.mf"/>
19 <manifest file="manifest.mf">
20 <attribute name="Main-Class" value="shoot_the_moon/ShootTheMoon"/>
21 <attribute name="Implementation-Version" value="${version}"/>
23 <jar destfile="dist/shoot-${version}.jar" basedir="classes" manifest="manifest.mf"/>
25 <target name="run" depends="compile">
26 <java classname="shoot_the_moon.ShootTheMoon">
28 <pathelement path="${outputDir}"/>