Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (49 sloc) 1.51 KB
<project name="menu" default="test" xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="src.dir" value="src/main/java" />
<property name="test.dir" value="src/test/java" />
<property name="lib.dir" value="lib" />
<property name="build.dir" value="target" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="testClasses.dir" value="${classes.dir}/tests" />
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<path id="classpath.test">
<pathelement location="${classes.dir}" />
<pathelement location="${testClasses.dir}" />
<path refid="classpath" />
</path>
<target name="clean" description="--> clean the project">
<delete dir="${build.dir}">
<fileset dir="." includes="**/*.class"/>
</delete>
</target>
<target name="resolve">
<ivy:retrieve />
</target>
<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}"
destdir="${classes.dir}"
classpathref="classpath"
includeantruntime="false">
</javac>
</target>
<target name="test" depends="resolve,compile">
<mkdir dir="${testClasses.dir}"/>
<javac srcdir="${test.dir}"
destdir="${testClasses.dir}"
includeantruntime="false"
classpathref="classpath.test" >
</javac>
<junit>
<classpath>
<path refid="classpath.test" />
</classpath>
<formatter type="brief" usefile="false" />
<batchtest>
<fileset dir="${testClasses.dir}" includes="**/*.class" />
</batchtest>
</junit>
</target>
</project>