Is your dependent class a 'test' class in project A or a 'main' class in project A ?
In eclipse, are you importing project A or you have used 'mvn eclipse:eclipse' to generate your dependencies? Eclipse does not distinguish between test classpath and compile classpath so that could be part of the issue... -----Original Message----- From: GAMBELLI Raffaele [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 11, 2007 7:26 AM To: [email protected] Subject: NoClassDeFoundError running unit test I'm using Maven 2.0.7 I have two project, let's call them A and B. A has only external dependencies. B has external dependencies, but is also dependent on project A. Project B uses a class from Project A in a unit test. Running either "mvn test" or "mvn package" from the project B level results in a java.lang.NoClassDefFoundError (it can't found the class defined in project A) during the unit test of project B. But, if I run directly unit test of project B from Eclipse, the unit test completes successfully. Why? Thanks in advance, regards. Raffaele --------------------------------------------------------------------- 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]
