ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KC Baltz <>
Subject Re: 1.4.1 JUnit adding jars to classpath behind my back
Date Wed, 23 Jan 2002 18:48:41 GMT
As a follow-up:  I downloaded the Ant source and commented out the 
following lines from the init() method of JUnitTask which are responsible 
for the errant jars appearing at the beginning of the classpath.  This 
fixed the problem.  Of course, I had to then add those jars manually by 
placing them last in the <classpath> element.

I don't like this solution as it requires patching standard Ant 1.4.1  Is 
there a better workaround?


     public void init() {

At 10:24 AM 1/23/02, you wrote:
>I installed Ant 1.4.1 yesterday and I'm having trouble with most of my 
>JUnit tests failing.  It seems to be related to the classpath because it's 
>failing anywhere I'm doing XML parsing.  I ran Ant with -debug and saw the 
>commandline that JUnit is generating (I'm forking <batchtest>).  I noticed 
>one difference between 1.3 and 1.4.1.  In 1.3, I had to manually add 
>ant.jar, junit.jar, and optional.jar to the <classpath> for the junit 
>task.  In 1.4.1, it seems to happen automatically, which I imagine is 
>supposed to be a feature.  But the problem is that when those jars come 
>first in the classpath, my tests fail.  If I put them at the end (in 1.3, 
>I have no control over this in 1.4.1), the tests succeed.  Suggestions?
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

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

View raw message