moty2011 2022-06-29 17:29 采纳率: 0%
浏览 40

sh " mvn clean package "

问题遇到的现象和发生背景

jenkins 打包

问题相关代码,请勿粘贴截图

sh " mvn clean package "

运行结果及报错内容

[Pipeline] sh

  • mvn clean package
    [ERROR] Could not create local repository at /home/repo -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException
    我的解答思路和尝试过的方法
    chmod 777 /home/repo
    我想要达到的结果
    解决
  • 写回答

2条回答 默认 最新

  • 二九筒 2022-06-29 17:37
    关注

    这个不是sh格式文件,服务器上如果设置了maven全局环境的话,直接在项目内执行 maven clean package

    评论

报告相同问题?

问题事件

  • 创建了问题 6月29日