On Tue, 17 Jul 2001, T. Master <[EMAIL PROTECTED]> wrote:

> [1] The Ant 1.3 docs mention the JUnit task, and mention to download
> and install it.  This has been done, however, Ant produces this
> error:
>     > unittests/example/build.xml [117] Unexpected element "junit"

Put junit.jar into your CLASSPATH and it works.

If you insist on not having junit.jar in your CLASSPATH, remove
optional.jar from ANT_HOME/lib as well to avoid classloader problems
and add

<taskdef name="junit" 
         classname="org.apache.tools.ant.taskdef.optional.junit.JUnitTask">
  <classpath>
    <pathelement location="/path/to/junit.jar" />
    <pathelement location="/path/to/optional.jar" />
  </classpath>
</taskdef>

> [2] Ant's Optional Libraries page mentions: "Library Dependencies
> The following libraries are needed in your lib/ext/ directory if you
> are using the indicated feature."

We should rewrite this, JAVA_HOME/jre/lib/ext is evil.

Stefan

Reply via email to