ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Tayek <>
Subject Re: ant & junit works on win98, fails on deadrat 6.2
Date Tue, 29 Jan 2002 14:47:04 GMT
At 03:08 PM 1/29/02 +0100, you wrote:
>On Mon, 28 Jan 2002, Ray Tayek <> wrote:
> > i cleaned up the script and added junit.jar to the classpath as you
> > suggested. i still get a build failed. the same file works on
> > windoze (with the actual path changed to "d:/...").
>It works on Windows because junit is part of your CLASSPATH there, I'm
>100% sure of this.

i took it off of the class path. and it still works.

> > "[junit] Could not create task of type: junit Common solutions are
> > adding the task to the and executing
> > /bin/bootstrap." before the build failed.
>You have exactly two choices to get <junit> to work:
>(1) place optional.jar and junit.jar into your CLASSPATH (or
>ANT_HOME/lib which means you place add it to your CLASSPATH

what i tried was to put junit.jar in to $ANT_HOME/lib (along with ant.jar 
and optional.jar).

i also did try adding optional.jar and junit.jar to the classpath, again no 

>(2) remove optional.jar from your CLASSPATH or the junit classes from
>that jar; remove junit.jar from your CLASSPATH; in each build file
>that uses <junit>, add a taskdef before invoking the task that looks
><taskdef name="junit"
>          classname="">
>   <classpath>
>     <pathelement location="your location of junit.jar" />
>     <pathelement location="your location of optional.jar or the extracted 
> junit classes of optional.jar" />
>   </classpath>
>I'd go for (1) if I were you 8-)

tried the second way, but it can't find JunitTask. i must be doing 
something really stupid.

>The rule of thumb for all optional tasks that require external
>libraries is: if the definition of the task is part of the system
>CLASSPATH, all libraries it needs have to be on the system CLASSPATH
>as well.

by system classpath, i assume you mean the $CLASSPATH environment variable. 
to avoid confusion, i did not set this.

is there a system classpath that ant uses? (other than $CLASSPATH). or is 
there a classpath that applies to all of the tasks?


ray tayek
actively seeking telecommuting work
orange county java users group
hate spam?

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

View raw message