Jake,
Try adding the following to project.properties

maven.junit.fork=yes

Paul Spencer
Jake Ewerdt wrote:

Hello,

I run maven test:test and I get this error:

BUILD FAILED
File...... file:/usr/users/jake/.maven/plugins/maven-test-plugin-1.4/
Element... junit
Line...... 94
Column.... 39
org/apache/tools/ant/taskdefs/optional/junit/JUnitTask
Total time: 11 seconds
Finished at: Tue Dec 30 12:24:31 EST 2003


I run maven with the -X flag, and it prints out this error (along with thousands of other lines):


Root cause
java.lang.NoClassDefFoundError: org/apache/tools/ant/taskdefs/optional/junit/JUnitTask



I also see this line, which shows ant-optional and junit in the classpath:


[DEBUG] Adding reference: maven.dependency.classpath -> ...:/usr/users/jake/.maven/repository/junit/jars/junit-3.8.1.jar:/usr/users/jake/.maven/repository/ant/jars/ant-optional-1.5.3-1.jar:...


I have ant-optional and junit in my project.xml dependancies:


    <dependency>
      <groupId>ant</groupId>
      <artifactId>ant-optional</artifactId>
      <version>1.5.3-1</version>
      <url>http://ant.apache.org</url>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <url>http://www.junit.org</url>
    </dependency>

and I have also tried adding this line to each of the above, which doesn't work:

<properties><classloader>root</classloader></properties>


The test:compile successfully completes, and the compiled unittests are in the target/test-classes directory, so it looks like the main problem is ant-optional is not being found.


I'm using Maven 1.0-rc1.

Thanks,

Jake



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





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



Reply via email to