Can you show us the sections of your build file?
Here is an example of a build file I created that does junit testing.
Code:
<project name="antlab-resources" default="all" basedir=".">
<description>
Build.xml file for Antlab-resources Project
</description>
<property name="src" location="."/>
<path id="classpath">
<pathelement path="${classpath}"/>
<pathelement path="."/>
<pathelement location="/net/hu15/cs2335/java/junit/junit.jar"/>
</path>
<target name="compile" description="compile java source" >
<javac srcdir="." destdir=".">
<classpath refid="classpath"/>
</javac>
</target>
<target name="test" depends="compile" description="run tests" >
<junit printsummary="yes" haltonfailure="yes" haltonerror="yes">
<classpath>
<pathelement location="${build.tests}"/>
<pathelement path="${src}"/>
</classpath>
<formatter type="plain"/>
<batchtest fork="yes" todir="${src}">
<fileset dir="${src}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="all" depends="compile,test" description="build,
jar, javadoc, and run" />
</project>