Seems normal to me. ANT needs JUnit.jar in its own classpath since it loads
(and resolves) the JunitTask that depends on JUnit, and you test classes
also need JUnit.jar, since also depending on JUnit. So adding JUnit.jar in
the <classpath> of the <junit> task takes care the of the latter, but not
the former. That's why you need JUnit.jar in the CLASSPATH before starting
ANT. I think there was discussion about this recently by Stefan or Erik.
--DD

 -----Original Message-----
From:   Chappell, Simon P [mailto:[EMAIL PROTECTED]] 
Sent:   Wednesday, March 20, 2002 4:16 PM
To:     Ant User mailing list (E-mail)
Subject:        Junit under ant ignoring my classpath

Does anyone have any insight into this:

As part of reducing my CLASSPATH to the bare minimum (currently: ".") I have
been increasing my use of <path> definitions. This had been going really
well until I hit the <junit> task. I dutifully added the <classpath
refid="test.path"/> and expected success! Needless to say, it all went south
quickly. If I have junit.jar in my CLASSPATH environment variable then the
build does not fail.

Is this a bug? I even tried the latest nightly build and Java 1.4.0 incase I
was too far behind the back edge of the envelope.

Simon

-----------------------------------------------------------------
Simon P. Chappell                     [EMAIL PROTECTED]
Java Programming Specialist                      www.landsend.com
Lands' End, Inc.                                   (608) 935-4526

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to