ClassNotFoundException or NoClassDefFoundError executing maven2 install -----------------------------------------------------------------------
Key: MSUREFIRE-157 URL: http://jira.codehaus.org/browse/MSUREFIRE-157 Project: Maven 2.x Surefire Plugin Issue Type: Wish Environment: eclipse 3.2, windows XP and j2se 1.4.2 Reporter: Francesc Xavier Hey, first all congratultions for your execellent job. We are using Maven2 in order to develop a project. This project has several modules with dependencies among them, reflected in their pom's. When we try to execute a test from the project root in command line (typing mvn test) all works fine, but when we try to execute 'mvn install', all the tests of modules that have dependencies with other modules (in our case, the core module) begins to fail throwing a java.lang.NoClassDefFoundError. Moreover, when we try to execute the same tests to the specific module the same error is produced. Pom parent has the following definitons <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <groupId>com.nextret.frwk</groupId> <artifactId>openfrwk-all</artifactId> <packaging>pom</packaging> <name>NexTReT Open Framework</name> <inceptionYear>2006</inceptionYear> <version>0.1-SNAPSHOT</version> <prerequisites> <maven>2.0.4</maven> </prerequisites> <modules> <module>openfrwk-core</module> <module>openfrwk-instrument</module> <module>openfrwk-mock</module> <module>openfrwk-ejbgateway</module> <module>openfrwk-security</module> <module>openfrwk-persistence</module> <module>openfrwk-tasks</module> <module>openfrwk-services</module> <module>openfrwk-services-jboss</module> </modules> .......................... (we have not included the dependencies that all are correctly retrieved from repository) and every pom module chlid has <project> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.nextret.frwk</groupId> <artifactId>openfrwk-all</artifactId> <version>0.1-SNAPSHOT</version> </parent> <groupId>com.nextret.frwk</groupId> <artifactId>openfrwk-core</artifactId> <packaging>jar</packaging> <name>Core</name> (also including the dependency of core module in dependencies element) <dependencies> <dependency> <groupId>${project.groupId}</groupId> <artifactId>openfrwk-core</artifactId> <version>0.1-SNAPSHOT</version> </dependency> ....................... </project> any suggestion ?? we have to skip all the tests (currently executed in eclipse), but we realize that are not the best way!! Thanks a lot!! Francesc Xavier -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira