ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/junit
Date Fri, 19 Sep 2003 12:07:22 GMT
On Fri, 19 Sep 2003, Antoine Lévy-Lambert <>

> I am a bit surprised that you solve this issue
> (classpath/includeantruntime) this way.

Please read the bugzilla report.

<junit fork="true" includeantruntime="false"> will not pass any
additional classpath at al.  This means the user's CLASSPATH is the
only thing passed to the forked VM.  This is so that classes from
ANT_HOME/lib like the specific Xerces version Ant uses do not taint
the classpath - users may want to test with a different XML parser,
DOM version, whatever.

<junit fork="true" includeantruntime="true"> is there to "help" the
user.  Ant uses a testrunner of its own, therefore some classes of Ant
itself must be available to the forked VM, namely JUnit itself, the
optional.junit package more or less completely and classes from Ant's
core the junit package depends on.

The code up until now located the necessary resources and passed them
in via java -classpath .  But if you do that, CLASSPATH will be
ignored by the forked VM.  I simply added the CLASSPATH to the command
line explicitly.

> The ant runtime is not in the CLASSPATH environment variable in
> ant1.6,

but in one of the jars added by the task.

> but in the system property java.class.path.

Like Xerces and everything else from ANT_HOME/lib that we explicitly
do not want to pass to the forked VM - that's why I've used the
environment variable directly.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message