Bug 1118 - JUnit task problem with classpath nested element
Summary: JUnit task problem with classpath nested element
Status: RESOLVED DUPLICATE of bug 38799
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.3
Hardware: All All
: P1 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-26 11:48 UTC by martin.moorhead
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description martin.moorhead 2001-03-26 11:48:27 UTC
The JUnit task does not seem to correctly use the classpath nested element. I 
have used this nested element to point to where the junit.jar file is located 
and the junit task failed. The error reported is that optional.jar needs to be 
added into the ant/lib directory, but I have already done this. 
I have been able to work around this problem by using the CLASSPATH environment
variable to point to junit.jar, but I would rather not do that. This problem 
occurs on both Windows 2000 and Linux platforms and in both cases can be worked 
around by using the CLASSPATH env variable.
In contrast, the javac task correctly uses the nested classpath element. This 
is why I think the problem is only in the JUnit task.
Thanks for your help.
Comment 1 Stefan Bodewig 2001-04-02 03:37:03 UTC
junit.jar and optional.jar must be loaded via the same class loader, either you
place junit.jar in your CLASSPATH or ANT_HOME/lib or you don't put optional.jar
in ANT_HOME/lib at all and define the task via a <taskdef> with nested a
<classpath> element, that contains both, junit.jar and optional.jar.
Comment 2 Stefan Bodewig 2002-02-21 10:32:41 UTC
reopen to assign it to new META BUG
Comment 3 Stefan Bodewig 2002-02-21 10:33:03 UTC

*** This bug has been marked as a duplicate of 6606 ***
Comment 4 Jesse Glick 2006-02-27 20:42:43 UTC
More precise duplicate.
Comment 5 Jesse Glick 2006-02-27 20:43:06 UTC

*** This bug has been marked as a duplicate of 38799 ***