tags:

views:

503

answers:

2

I am having problems building a maven 3 pom:

[seam] $ /usr/lib/jvm/java-6-openjdk/bin/java -cp /home/walterjwhite/.hudson/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.372.jar:/opt/apache/maven/3.0.beta.1/boot/plexus-classworlds-2.2.3.jar hudson.maven.agent.Main /opt/apache/maven/3.0.beta.1 /opt/apache/tomcat/6.0.29/webapps/hudson/WEB-INF/lib/remoting-1.372.jar /home/walterjwhite/.hudson/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.372.jar 37568 
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 Finished: FAILURE

I can build this just fine locally, but Hudson is doing its own thing. I read that Hudson will support Maven 3, but what can I do now?

+1  A: 

This looks like HUDSON-4988 which is not fixed. Use Maven 2 with Hudson for now.

Pascal Thivent
Unfortunately, a JBoss artifact I'm trying to use apparently has a requirement on Maven 3.
@Walter Do you have a link to its pom?
Pascal Thivent
@Pascal - http://github.com/walterjwhite/project.configuration/blob/master/poms/dependencyManagement/seam/base.xml
@Walter I meant a link to *THE* artifact that is causing problems.
Pascal Thivent
I figured as much, the artifact that I need is org.jboss.seam.seam-persistence:3.0.0-SNAPSHOT. I think it is the JBoss Spec Java EE 6 that is the problem.
@Walter I figured out that it was this artifact... I'm just asking for a link to its pom :)
Pascal Thivent
+1  A: 

Even if you can't execute it as a maven build in hudson, you could still execute Maven 3 as a shell task in a freestyle build. This is not a best practice, but a workaround if you can't build otherwise.

seanizer
Ok, I will probably not do this since it isn't recommended. I will just execute my builds from the command-line, it doesn't happen automatically, but for the time-being, it works. Any estimates as to when maven 3 (beta) will be supported?

related questions