自动化构建的时候报错,网搜查询说是maven的jenkinks配置问题导致的。
修改系统工具配置的maven配置就可以了

 

 
 

 


Started by user XX Building in workspace /root/.jenkins/workspace/AutoTest_Maven Checking out a fresh workspace because there's no workspace at /root/.jenkins/workspace/AutoTest_Maven Cleaning local Directory . Checking out svn: at revision '2018-05-24T14:56:10.030 +0800' --quiet Using sole credentials renqiang/****** (SVN_Renqiang) in realm ?<svn://218.241.154.149:3690> "Repository"? At revision 36020 Parsing POMs Discovered a new module ai.qa.autotest.ui:AI_UI_AutoTest AI_UI_AutoTest Modules changed, recalculating dependency graph Established TCP socket on 36907 [AutoTest_Maven] $ " /usr/lib/jvm/jdk1.8.0_161/jre/bin/java" -cp /root/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.12-alpha-1.jar:/usr/local/maven/apache-maven-3.5.2/boot/plexus-classworlds-2.5.2.jar:/usr/local/maven/apache-maven-3.5.2/conf/logging jenkins.maven3.agent.Maven35Main /usr/local/maven/apache-maven-3.5.2 /usr/local/tomcat/apache-tomcat-9.0.8/webapps/jenkins/WEB-INF/lib/remoting-3.17.jar /root/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.12-alpha-1.jar /root/.jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.12-alpha-1.jar 36907 ERROR: Failed to parse POMs java.io.IOException: Cannot run program " /usr/lib/jvm/jdk1.8.0_161/jre/bin/java" (in directory "/root/.jenkins/workspace/AutoTest_Maven"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at hudson.Proc$LocalProc.<init>(Proc.java:249) at hudson.Proc$LocalProc.<init>(Proc.java:218) at hudson.Launcher$LocalLauncher.launch(Launcher.java:929) at hudson.Launcher$ProcStarter.start(Launcher.java:449) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:278) at hudson.maven.ProcessCache.get(ProcessCache.java:236) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1727) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 12 more

转载于:https://www.cnblogs.com/conquerorren/p/9084013.html

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐