jenkins使用mavent构建报错集聚

2021/6/1 18:20:52

本文主要是介绍jenkins使用mavent构建报错集聚,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

报错内容:

 

1、ERROR: Failed to parse POMs

报错代码如下:

 > /usr/bin/git rev-list --no-walk a888f362b754d2d2b32182c33e9e97a181b634dd # timeout=10
Parsing POMs
Modules changed, recalculating dependency graph
Established TCP socket on 22551
[saas-core] $ /app/jdk1.8.0_141/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven33-agent-1.13.jar:/usr/local/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/usr/local/apache-maven-3.3.9/conf/logging jenkins.maven3.agent.Maven33Main /usr/local/apache-maven-3.3.9 /var/cache/jenkins/war/WEB-INF/lib/remoting-4.6.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven33-interceptor-1.13.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.13.jar 22551
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program "/app/jdk1.8.0_141/bin/java" (in directory "/data/jenkins/workspace/saas-core"): error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at hudson.Proc$LocalProc.<init>(Proc.java:252)
    at hudson.Proc$LocalProc.<init>(Proc.java:221)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:996)
    at hudson.Launcher$ProcStarter.start(Launcher.java:508)

 

image-20210601170251091

 

 

解决:

其实这个报错已经说明了,是java问题,具体问题是jenkins中java路径配置错误,在系统管理>>全局工具配置>>JDK,如下图,已经报错显示了

image-20210601173731472

 

在jenkins机器查看java的实际路径为:

echo $JAVA_HOME

image-20210601173807592

将正确的路径替换jenkins即可成功构建,解决报错:

image-20210601173853217

 

 

2、构建推送deploy依赖至nexus仓库报错405

 

报错代码:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project 

image-20210601174206973

 

解决:

这个是开发那边代码里面设置nexus仓库的路径错误,导致405权限不足,

比如你jenkins中的mavent设置的settings.xml文件指定的远端仓库路径要和研发的一致

image-20210601174510025

 

 



这篇关于jenkins使用mavent构建报错集聚的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程