Reputation: 6884
I am having a compile issue with ant, junit.jar cannot be found here is my build file:
<path id="lib">
<fileset dir="library">
<include name="*.jar" />
</fileset>
</path>
<target name="test">
<mkdir dir="tmp/reports" />
<mkdir dir="tmp/build" />
<javac srcdir="test" destdir="tmp/build" includeantruntime="false">
<classpath refid="lib" />
</javac>
<echo message="Build done" />
<junit fork="yes" haltonfailure="yes">
<batchtest todir="tmp/reports">
<fileset dir="tmp/test">
<include name="*.java" />
</fileset>
</batchtest>
<formatter type="xml" usefile="true"/>
<classpath refid="test.classpath" />
</junit>
</target>
I am not sure i understand because ant in -verbose
mode did find me JUnit jar see attached screenshot:
Upvotes: 1
Views: 116
Reputation: 72854
This should compile fine in Ant. Make sure you're using a recent version of JUnit. Old versions (e.g. 3.8.1) have different package hierarchies than JUnit 4.x.
Upvotes: 2