ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14971] - <junit> task replaces classpath when includeantruntime && fork="yes" is used
Date Mon, 31 Mar 2003 11:57:29 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14971>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14971

<junit> task replaces classpath when includeantruntime && fork="yes" is used

bodewig@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dev@ant.apache.org
         AssignedTo|dev@ant.apache.org          |bodewig@apache.org
   Target Milestone|---                         |1.6



------- Additional Comments From bodewig@apache.org  2003-03-31 11:57 -------
Hmm, I see where the problem lies.

A workaround for you would be something like this:

<property env="env"/>
<junit ...>
  <classpath path="${env.CLASSPATH}"/>
  ...
</junit>

We want forked <junit> to become independent of Ant's classpath and in particular
the stuff in ANT_HOME/lib, that's why we don't include the system classpath
explicitly here.

If includeantruntime is false, we will invoke the spawned VM without any
classpath setting to ensure you get whatever is in your environment.  If it is
true, we explicitly pass the jars, just as described and thus overwrite
CLASSPATH, this is not intentional.

The only way around this is really going to the native environment, as 
java.class.path has already been tainted by ANT_HOME/lib.  I'll try to come up
with a solution.

Mime
View raw message