Ant >> Compile and JUnit
<?xml version="1.0" encoding="UTF-8"?>
<project default="runjunit" name="Compile and run JUnit">
<target name="runjunit" depends="compile">
<Junit printsummary="on">
<test name="com.example.TestAClass"/>
<classpath>
<pathelement location="C:/Path/To/JUnit/junit3.8.2.jar"/>
<pathelement location="compiled"/>
</classpath>
</Junit>
</target>
<target name="compile">
<javac includeantruntime="false" srcdir="./srrc" destdir="compiled" classpath="C:/Path/To/JUnit/junit3.8.2.jar"/>
</target>
</project>