-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey,

i think you meant classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"?
i tried with that and it actually finds the task, but cant satisfy the dependency with junit.jar:


BUILD FAILED: build.xml:83: taskdef A class needed by class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask cannot be found: junit/framework/Test

I heard that you shouldnt use ant-junit.jar with the taskdef at all, but instead use the junit.jar classloader, but what classname should i specify for that?

Thanks in advance

Am 14.03.2005 um 07:26 schrieb Antoine Levy-Lambert:

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" 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]

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iD8DBQFCNZ8rFG7pbP1EbVMRAmuJAJ0WJ77GKPbXXdTFQdB/UD6VnJI/UQCgjpP1
mTEtfYoBbzBie3Oya8gtA7w=
=d7+r
-----END PGP SIGNATURE-----


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to