Hi,
I have the same problem with one of my multi-module projects (tested
with Maven 2.0.7 and Maven 2.0.9). I thought it would be related to some
weird misconfiguration and so just commented-out the affected <module/>
and released it manually instead.
I have the following dependencies in the module that fails to test
during "mvn release"
<dependency>
<groupId>some.groupid</groupId>
<artifactId>someOtherArtifact</artifactId>
<version>${someOtherArtifact.version}</version>
</dependency>
<dependency>
<groupId>some.groupid</groupId>
<artifactId>someOtherArtifact</artifactId>
<version>${someOtherArtifact.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
My project structure is the standard layout suggested for multi-module
projects:
pom.xml
|
|
+-- projectA (some.groupid:projectA)
|
+-- projectB (some.groupid:projectB)
|
+-- projectC (some.groupid:projectC)
Running 'mvn test' from either the top-level project or from within each
module works fine but running "mvn release" from the top-level project
fails for the module with the above mentioned dependencies because the
'compile'-scoped dependency is not on the classpath, only the one with
the 'test' scope.
The exception (see below) occurs inside surefire reflection code but I
don't think it's the surefire plugin that is responsible for composing
the classpath - is it ?
Regards,
Tobias
P.S. I am using
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.0-beta-7</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
</plugin>
and the exception I get is
org.apache.maven.surefire.booter.SurefireExecutionException:
de/freenet/fitworkflow/ParamSet; nested exception is
java.lang.NoClassDefFoundError: someClassFromSomeOtherArtifact
java.lang.NoClassDefFoundError: someClassFromSomeOtherArtifact
at java.lang.Class.getDeclaredMethods0(Native Method)
at
java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.getMethod0(Class.java:2642)
at java.lang.Class.getMethod(Class.java:1579)
at
org.apache.maven.surefire.junit.JUnitTestSet.createInstanceFromSuiteMethod(JUnitTestSet.java:176)
at
org.apache.maven.surefire.junit.JUnitTestSet.constructTestObject(JUnitTestSet.java:140)
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:197)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
I have a similar problem with the release plugin.
That is, it is OK with normal compile but fails during deploy part of
release plugin.
I have narrowed it down (using -X) to a jar from a local (ie part of a
local parent pom) dependency from a missing from the classpath during the
compiler:testCompile.
"Tawfik, Sameh E"
<[EMAIL PROTECTED]
isaac.com> To
"Maven Users List"
06/08/2008 01:08 <users@maven.apache.org>
p.m. cc
Subject
Please respond to mvn clean install post-site?
"Maven Users
List"
<[EMAIL PROTECTED]
he.org>
I'm experiencing a strange behavior from maven 2.0.9 running on Windows
2003 version 5.2
When I run "mvn -Dmaven.test.skip.exec=true clean install post-site" The
build fails because of a compilation error
But, if I run "mvn -Dmaven.test.skip.exec=true clean compile" the build
compile everything successfully?
So, does anyone know why this is happening? Or if there is a work around
to this problem?
It seems the problem occurs when I specify the "post-site" goal! I
removed from the pom.xml files all the code that get executed as
pre-site and post-site to make sure nothing in this code is causing the
compilation error, but that did not make any difference the build failed
with the compilation error?
The strange issue is that I've been running the build for a while using
"mvn -Dmaven.test.skip.exec=true clean install post-site" with no
problems until recently? And the same code compiles successfully when I
do not specify the post-site goal as I specified above?
Thanks,
Sameh
This email and any files transmitted with it are confidential, proprietary
and intended solely for the individual or entity to whom they are
addressed.
If you have received this email in error please delete it immediately.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-------------------------------------------------------------------------------------------------------------------------------------
This email message and any accompanying attachments may contain information that is confidential and subject to legal privilege.
If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments.
If you have received this message in error, please notify the sender immediately and delete this message.
Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of AMP.
Please note that this communication does not designate an information system for the purposes of the Electronic Transactions Act 2002.
You can contact AMP Financial Services by calling 0800 808 267 or by emailing us at [EMAIL PROTECTED]
---------------------------------------------------------------------
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]