在jenkins中运行maven项目时出现java.lang.reflect.InvocationTargetException

时间:2017-04-28 08:36:29

标签: jenkins

这是堆栈跟踪树,我在Jenkins运行我的maven项目时得到了。我不明白我的代码有什么问题,也许是因为Jenkins的一些插件。

    <===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven:  -B -f /home/app/JavaEclipse/SampleMavenTest/pom.xml clean compile test
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
    at jenkins.maven3.agent.Maven33Main.launch(Maven33Main.java:176)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at hudson.maven.Maven3Builder.call(Maven3Builder.java:139)
    at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
    at hudson.remoting.UserRequest.perform(UserRequest.java:153)
    at hudson.remoting.UserRequest.perform(UserRequest.java:50)
    at hudson.remoting.Request$2.run(Request.java:332)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchFieldError: DEFAULT_USER_SETTINGS_FILE
    at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.settings(DefaultMavenExecutionRequestBuilder.java:658)
    at org.apache.maven.cli.DefaultMavenExecutionRequestBuilder.getMavenExecutionRequest(DefaultMavenExecutionRequestBuilder.java:149)
    at org.jvnet.hudson.maven3.launcher.Maven33Launcher.getMavenExecutionRequest(Maven33Launcher.java:150)
    at org.jvnet.hudson.maven3.launcher.Maven33Launcher.main(Maven33Launcher.java:127)
    ... 21 more
ERROR: Failed to parse POMs
channel stopped

0 个答案:

没有答案