ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hammant <>
Subject Re: <script> needs a classpath param
Date Wed, 08 Aug 2001 07:01:09 GMT
Mike Williams wrote:

> Mike> <taskdef name="junit" 
> Mike> classname="">
> Mike> <classpath>
> Mike> <pathelement location="${optional.class.path}" />
> Mike> <pathelement location="${junit.home}/junit.jar" />
> Mike> </classpath>
> Mike> </taskdef>
> Paul> It's good but not perfect as it forces all <script> or <junit>
> Paul> using targets to have the same classpath.
> Er, I don't think so.  It only sets the classpath for defining the
> JUnitTask; the JUnitTask class and supporting libs (ie. junit.jar).  
> You can still specify a project-specific path to <junit> later on, eg.
><pathelement location="build/classes/" />

Yup I guess that would work ... if ${optional.class.path} & ${junit.home}/junit.jar &
build/classes/ were loaded into the same classloader (not two) then it would work fine.

Stefan points out that there could be problems for Xalan based tasks because of static factory
methods, but I see this working for <scrip> & <junit>.

Regards - Paul H
CVS -1, Perforce +1

Do You Yahoo!?
Get your free address at
or your free address at

View raw message