ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: ant & junit works on win98, fails on deadrat 6.2
Date Tue, 29 Jan 2002 14:08:28 GMT
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.

> "[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


(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" 
    <pathelement location="your location of junit.jar" />
    <pathelement location="your location of optional.jar or the extracted junit classes
of optional.jar" />

I'd go for (1) if I were you 8-)

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.


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

View raw message