[JIRA] Reopened: (HUDSON-4988) Maven 3 support in maven-plugin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Reopened: (HUDSON-4988) Maven 3 support in maven-plugin

Kohsuke Kawaguchi
Administrator

     [ http://issues.hudson-ci.org/browse/HUDSON-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

unguiculus reopened HUDSON-4988:
--------------------------------


I'm using Hudson ver. 1.393-SNAPSHOT (private-01/03/2011 18:16-olamy) and also (still) have the problem that a parent pom cannot be downloaded from Nexus but with Maven 3.0.1.

It sounds like HUDSON-8387 but since I'm having the problem with Maven 3 I thought I'd reopen this issue instead of HUDSON-8387. I hope this is ok.

Found mavenVersion 3.0.1 from file jar:file:/exports/home/hudson/apache-maven-3.0.1/lib/maven-core-3.0.1.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
Parsing POMs
failed to transfer Error transferring file: central
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not transfer artifact myGroupId:myArtifactId:pom:10 from/to central (http://central): Error transferring file: central and 'parent.relativePath' points at wrong local POM @ line 5, column 10

        at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:325)
        at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:382)
        at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1096)
        at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:983)
        at hudson.FilePath.act(FilePath.java:756)
        at hudson.FilePath.act(FilePath.java:738)
        at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:690)
        at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:526)
        at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417)
        at hudson.model.Run.run(Run.java:1362)
        at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:400)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:145)


> Maven 3 support in maven-plugin
> -------------------------------
>
>                 Key: HUDSON-4988
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-4988
>             Project: Hudson
>          Issue Type: New Feature
>          Components: maven2
>            Reporter: zlosch
>            Assignee: olamy
>         Attachments: consoleText-maven3-site-build.zip, hudson-m3-tycho-debug-2.txt, hudson-m3-tycho-debug.log
>
>
> 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

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira