Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 57 lines (50 sloc) 1.56 KB
<?xml version="1.0"?>
<project name="java-course" default="hudson" basedir=".">
<target name="info">
<echo>This is an ant build script.</echo>
<echo>Currently used by Hudson to ensure the repository is always healthy.</echo>
</target>
<target name="hudson" description="for continous integration" depends="clean,compile,compile-tests,test"/>
<target name="clean">
<delete dir="classes-src"/>
<delete dir="classes-test"/>
<delete dir="test-results"/>
</target>
<target name="compile">
<mkdir dir="classes-src"/>
<javac srcdir="src" destdir="classes-src" encoding="UTF-8" target="1.6">
<classpath>
<fileset dir="lib" includes="*.jar"/>
</classpath>
</javac>
<copy todir="classes-src">
<fileset dir="src" includes="**/*" excludes="**/*.java"/>
</copy>
</target>
<target name="compile-tests">
<mkdir dir="classes-test"/>
<javac srcdir="test" destdir="classes-test" encoding="UTF-8" target="1.6">
<classpath>
<path path="classes-src"/>
<fileset dir="lib" includes="*.jar"/>
</classpath>
</javac>
<copy todir="classes-test">
<fileset dir="test" includes="**/*" excludes="**/*.java"/>
</copy>
</target>
<target name="test">
<mkdir dir="test-results"/>
<junit haltonfailure="true">
<batchtest todir="test-results">
<fileset dir="classes-test" includes="**/*Test.class" excludes="**/Abstract*"/>
<formatter type="xml"/>
</batchtest>
<classpath>
<path path="classes-src"/>
<path path="classes-test"/>
<fileset dir="lib" includes="*.jar"/>
</classpath>
</junit>
</target>
</project>