zoukankan      html  css  js  c++  java
  • 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

     

     

    专业从事搬砖多年,还是在继续搬砖中,厚积薄发~
  • 相关阅读:
    关于求 p_i != i and p_i != i+1 的方案数的思考过程
    poj 3041 Asteroids 二分图最小覆盖点
    poj 1325 Machine Schedule 最小顶点覆盖
    poj 1011 Sticks 减枝搜索
    poj 1469 COURSES 最大匹配
    zoj 1516 Uncle Tom's Inherited Land 最大独立边集合(最大匹配)
    Path Cover (路径覆盖)
    hdu 3530 SubSequence TwoPoint单调队列维护最值
    zoj 1654 Place the Rebots 最大独立集转换成二分图最大独立边(最大匹配)
    poj 1466 Girls and Boys 二分图最大独立子集
  • 原文地址:https://www.cnblogs.com/Crazy-Liu/p/14838243.html
Copyright © 2011-2022 走看看