On Mon, 28 Jan 2002, Ray Tayek <[EMAIL PROTECTED]> 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 defaullts.properties 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
implicitly).

or

(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
like

<taskdef name="junit" 
         classname="org.apache.tools.ant.taskdefs.junit.JUnitTask">
  <classpath>
    <pathelement location="your location of junit.jar" />
    <pathelement location="your location of optional.jar or the extracted junit 
classes of optional.jar" />
  </classpath>
</taskdef>

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.

Stefan

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

Reply via email to