On Sun, Nov 18, 2001 at 05:25:40PM +1100, Peter Donald wrote:
> On Sun, 18 Nov 2001 17:15, Jeff Turner wrote:
> > Hi,
> >
> > I'm trying to use <taskdef> to define the <junit> task, so I don't have
> > to require all users to copy junit.jar to the $ANT_HOME/lib.
[..]
> 
> Unfortunately it isn't possible. The reason is that Ant will go looking for 
> the junit task. It will first call the loadClass() in the ClassLoader created 
> by taskdef. However this ClassLoader will first check the parent classloader 
> for the junit class. It will find the junit class (because it is in 
> ${ant.home}/lib/optional.jar). However unless junit.jar is also in the parent 
> classloader, the JVM will be unable to locate the required junit classes and 
> thus will report that it fails to load the junit task.

Ah of course.. the joys of delegating classloaders..

thanks,

--Jeff

> -- 
> Cheers,
> 
> Pete

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

Reply via email to