ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: Simple question about jUnit task forking
Date Tue, 31 Oct 2000 09:45:13 GMT
>>>>> "JC" == Jonathan Carlson <jcarlson@is.com> writes:

 JC> Why will it find the class when I don't fork it, but it won't
 JC> find it when I do fork it?

If you don't fork it, you are running junit in the same VM as
Ant. Ant's junit classes are in ant.jar or optional.jar which are
included by your Ant wrapper script automatically.

Solutions:

(1) Add ant.jar and optional.jar to your CLASSPATH environment
variable.

(2) Invoke junit like this

<junit fork="yes">
  <classpath>
    <pathelement path="${java.class.path}" />
  </classpath>
...
</junit>

this will ensure the Ant classes are in your CLASSPATH.

I'd recommend option (2).

Stefan

Mime
View raw message