you need to taskdef junit in your build file, specifying a classpath which includes ant-junit.jar and junit.jar.
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.JunitTask">
<classpath>
<pathelement location="path of junit.jar"/>
<pathelement location="path of ant-junit.jar"/>
</classpath>
</taskdef>
Cheers, Antoine
Danilo Bürger wrote:
I would like to integrate Junit into Ant as specified by 3. in http://ant.apache.org/manual/OptionalTasks/junit.html ("3. Do neither of the above, and instead, specify their locations using a <classpath> element in the build file. See the FAQ for details.")
Now i have the junit.jar (3.8.1) and also the xalan.jar in my projects lib/ directory. I have the following target:
<path id="class.path" description="The main build classpath"> <pathelement location="${build.dir}/classes"/> <fileset dir="${lib.dir}" includes="**/*.jar"/> </path>
<target name="junit" depends="..." description="..."> <junit printsummary="yes"> <classpath refid="class.path"/> </junit> </target>
I am still getting the famous "Ant could not find the task or a class this task relies upon." error.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]