Jenkins编译过程中出现ERROR_ Failed to parse POMs错误

Posted douyi

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jenkins编译过程中出现ERROR_ Failed to parse POMs错误相关的知识,希望对你有一定的参考价值。

一、在使用jenkins编写过程中突然出现以下问题
Parsing POMs Established TCP socket on 59407 [java] $ java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.12-alpha-1.jar:/usr/local/apache-maven-3.5.4/boot/plexus-classworlds-2.5.2.jar:/usr/local/apache-maven-3.5.4/conf/logging jenkins.maven3.agent.Maven35Main /usr/local/apache-maven-3.5.4 /var/cache/jenkins/war/WEB-INF/lib/remoting-3.23.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.12-alpha-1.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.12-alpha-1.jar 59407 ERROR: Failed to parse POMs java.io.IOException: Cannot run program "java" (in directory "/var/lib/jenkins/workspace/java"): error=2, 没有那个文件或目录 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:1815) 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, 没有那个文件或目录 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 Email was triggered for: Always Sending email for trigger: Always Sending email to: ghs_test@163.com Finished: FAILURE
 
出现上面的错误提示是没有指定JDK的路径,解决方法:是在Jenkins的系统管理→全局工具配置→找到JDK配置项,在JAVA_HOME设置你jdk目录的路径,保存重新启动Jenkins就行了!

以上是关于Jenkins编译过程中出现ERROR_ Failed to parse POMs错误的主要内容,如果未能解决你的问题,请参考以下文章

jenkins配置过程中可能出现的问题

jenkins配置过程中可能出现的问题

MTK手机线刷错误提示BROM ERROR:S_FT_ENABLE_DRAM_FAIL(4032)

[zz] Python 3.7 anaconda environment - import _ssl DLL load fail error

DevIL编译过程出现的 “error C2001: newline in constant” 解决方法(VS2015)

Jenkins 源代码编译