On Wed, 2 Jun 2004, Vincent Massol <[EMAIL PROTECTED]> wrote:

> If only I could find a way not to require the junit jar in the
> anthome/lib dir!

ant -lib PATH/TO/junit.jar or place it in either CLASSPATH or ~/.ant/lib

Nothing of which can be controlled from within the build file.

> I've tried redefining the junit Ant task using a taskdef and a
> classpaht but it didn't work.

The joy of delegating class loaders.
<http://ant.apache.org/faq#delegating-classloader>

> I need to do some research.  It might be possible with Ant 1.6+.

You can only redefine <junit> with a custom classpath if you remove
ant-junit.jar from ANT_HOME/lib.  Otherwise the junit task
implementation will be loaded by a classloader higher up in the
hierarchy than the one that contains junit.jar - and this classloader
doesn't know about the "lower" one to pull JUnit in from there.

Stefan

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

Reply via email to