Legacy Maven 2作业类型插件与Maven 3.2.1无法正常工作

时间:2016-02-17 10:44:17

标签: hudson hudson-plugins

我尝试将Hudson(3.3.3)和Legacy Maven 2 job type Plugin(3.0.2)与Maven(3.2.1)一起使用,但我收到错误。有没有办法使用Maven 3.2.1?

工作日志:

Found mavenVersion 3.2.1 from file jar:file:/C:/Users/dur/.hudson/tools/Maven_3.2.1/lib/maven-core-3.2.1.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
Parsing POMs
[workspace] $ "C:\Program Files\Java\jdk1.7.0_25/bin/java" -cp C:\Users\dur\.hudson\plugins\maven-plugin\WEB-INF\lib\maven3-agent-3.0.2.jar;C:\Users\dur\.hudson\tools\Maven_3.2.1\boot\plexus-classworlds-2.5.1.jar org.jvnet.hudson.maven3.agent.Maven3Main C:\Users\dur\.hudson\tools\Maven_3.2.1 C:\Users\dur\.hudson\war\webapp\WEB-INF\lib\hudson-remoting-3.0.3.jar C:\Users\dur\.hudson\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-3.0.2.jar 61659
<===[HUDSON REMOTING CAPACITY]===>channel started
Executing Maven:  -B -f C:\Users\dur\.hudson\jobs\Test\workspace\pom.xml clean install -P Hudson
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
    at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:146)
    at hudson.maven.Maven3Builder.call(Maven3Builder.java:124)
    at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
    at hudson.remoting.UserRequest.perform(UserRequest.java:107)
    at hudson.remoting.UserRequest.perform(UserRequest.java:41)
    at hudson.remoting.Request$2.run(Request.java:276)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/cli/MavenLoggerManager
    at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:73)
    ... 18 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.cli.MavenLoggerManager
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
    ... 19 more
channel stopped

我发现了以下问题:

但没有可行的答案。

1 个答案:

答案 0 :(得分:0)

我找到了Hudson(3.3.3)free-style projectMaven 3 Build Plugin(3.0.5)的解决方法:

  1. Maven 3 Build Plugin配置(参见Hudson Book):

    Maven configuration

  2. 构建步骤配置(请参阅Hudson Book):

    Build Step configuration