报错代码如下:
> /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)
解决:
其实这个报错已经说明了,是java问题,具体问题是jenkins中java路径配置错误,在系统管理>>全局工具配置>>JDK,如下图,已经报错显示了
在jenkins机器查看java的实际路径为:
echo $JAVA_HOME
将正确的路径替换jenkins即可成功构建,解决报错:
报错代码:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project
解决:
这个是开发那边代码里面设置nexus仓库的路径错误,导致405权限不足,
比如你jenkins中的mavent设置的settings.xml文件指定的远端仓库路径要和研发的一致