ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject Re: Junit Integration Problem
Date Mon, 14 Mar 2005 06:26:18 GMT
Hello Danilo,
you need to taskdef junit in your build file, specifying  a classpath 
which includes ant-junit.jar and junit.jar.
<taskdef name="junit" 
         <pathelement location="path of junit.jar"/>
         <pathelement location="path of ant-junit.jar"/>


Danilo B├╝rger wrote:

> I would like to integrate Junit into Ant as specified by 3. in
> ("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:
For additional commands, e-mail:

View raw message