Hi,
I'm getting a java.lang.NoClassDefFoundError when running a test and yet, the code compiles fine. Any ideas as to what's going on? The exact same code compiles and test fine on another box which has the same mvn and java version.
I recently ran across the same issue. My pom.xml contained two dependencies

<dependency>
 <groupId>X</groupId>
 <artifactId>Y</artifactId>
 <version>Z</version>
</dependency>
<dependency>
 <groupId>X</groupId>
 <artifactId>Y</artifactId>
 <version>Z</version>
 <type>test-jar</type>
</dependency>

and somehow the classpath contained only the test-jar dependeny when the tests were executed. I think this is bug http://jira.codehaus.org/browse/MNG-1971. Since there seems to be no real work-around I just removed the <type>test-jar</type> from the dependency.

Regards,

Tobias


There are no differences between 'mvn help:effective-settings' and/or 'mvn help:effective-pom' and the artifact a jar that was downloaded contains the class; which makes sense because how else can the code compile.

I am stumped.


Regards,
Alan


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

Reply via email to