See this URL : http://ant.apache.org/faq.html#delegating-classloader
I guess the best solution would be to go straight to ant 1.6 (you can
download the beta2).
Then you can use the second solution which is to move ant-junit.jar out of
the classpath, that is to say out of $ANT_HOME/lib if you are running ant
from the command line.
Then you can taskdef junit using ant-junit.jar and junit.jar, as you
mention.
There is no way in the build file to change the classpath in which ant is
started.
Cheers,
Antoine
-----Ursprüngliche Nachricht-----
Von: David Lemieux (QC/EMC) [mailto:David.Lemieux@ericsson.com]
Gesendet: Donnerstag, 6. November 2003 22:25
An: Ant Users List (E-mail)
Betreff: Junit optional taskdef
Hi,
I'm trying to use the junit optional task.
If I put the junit.jar in the ANT_HOME/lib everything work fine.
The problem is that I have to use the build script in many different
environment(pc,unix,IDE,...) using different installation of ant and I can't
put the junit.jar everywhere. I'd like to do something like this:
<taskdef name="junit"
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
<classpath>
<fileset dir="${dirundermyproject}/ant/">
<include name="optional.jar"/>
</fileset>
<fileset dir="${dirundermyproject}/junit/3.8.1/">
<include name="junit.jar"/>
</fileset>
</classpath>
</taskdef>
that would activate the junit task independently of the environment.
Or, is there a way to modify the classpath in which ant is started in the
build file?
Then I could add the jar from under my project.
I don't want to maintain the different classpath or invocation line of the
ant script to reflect any additionnal use of optinnal task.
Thanks
David
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|