Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Hudson maven-plugin doesn't work with Maven 3 on Linux. On Linux Hudson builds its own Java command line and does some additional magic to launch Maven. On Windows it works fine because mvn.bat is used instead.
The mechanism on Linux fails for two reasons:
1. classworlds-*.jar was upgraded to plexus-classworlds-2.2.2 with Maven 3, so the classpath is wrong.
2. plexus-classworlds-2.2.2 is not fully backward compatible. After renaming the jar to classworlds-2.2.2.jar the error is:
$ /opt/java/x86_64/jdk1.6.0_16/bin/java -Xmx768m -XX:MaxPermSize=256m -cp /home/hudson/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.335.jar:/opt/maven/3.0-alpha-5/boot/classworlds-2.2.2.jar hudson.maven.agent.Main /opt/maven/3.0-alpha-5 /usr/share/tomcat5/webapps/hudson/WEB-INF/lib/remoting-1.335.jar /home/hudson/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.335.jar 32917
Exception in thread "main" java.lang.NoSuchMethodError: org.codehaus.classworlds.Launcher.getWorld()Lorg/codehaus/classworlds/ClassWorld;
at hudson.maven.agent.Main.main(Main.java:115)
at hudson.maven.agent.Main.main(Main.java:62)
ERROR: Failed to launch Maven. Exit code = 1
Skipping sonar analysis due to bad build status FAILURE
Finished: FAILURE
Reason for the above error is that getWorld() returns a different type in 2.2.2 which isn't assignable to the type returned in 1.x.
A general question: Why does Hudson use different mechanisms for launching Maven on Windows and Linux?
Tested with 1.335
Attachments
Issue Links
- depends on
-
JENKINS-5360 add a new classloader ("a la" child first for plugin)
-
- Closed
-
- is blocking
-
JENKINS-7734 Hudson : NPEs inconsistently during maven builds
-
- Resolved
-
- is related to
-
JENKINS-8389 Add support for Apache Maven 3.0.1 auto installer
-
- Resolved
-
Activity
Field | Original Value | New Value |
---|---|---|
Summary | maven-plugin not working with Maven 3 on Linux | maven-plugin not working with Maven 3 |
Link |
This issue depends on |
Assignee | olamy [ olamy ] |
Issue Type | Bug [ 1 ] | New Feature [ 2 ] |
Priority | Critical [ 2 ] | Major [ 3 ] |
Summary | maven-plugin not working with Maven 3 | Maven 3 support in maven-plugin |
Link |
This issue is blocking |
Attachment | hudson-m3-tycho-debug.log [ 20091 ] |
Attachment | hudson-m3-tycho-debug-2.txt [ 20098 ] |
Attachment | consoleText-maven3-site-build.zip [ 20100 ] |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Link |
This issue is related to |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Reopened [ 4 ] |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Reopened [ 4 ] |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Closed [ 6 ] |
Component/s | maven-plugin [ 16033 ] | |
Component/s | maven2 [ 15487 ] |
Workflow | JNJira [ 135072 ] | JNJira + In-Review [ 203236 ] |