ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <j...@socialchange.net.au>
Subject Re: taskdef'ing junit
Date Sun, 18 Nov 2001 07:16:58 GMT
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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message