jenkins部署时Maven编译失败
0
编译失败信息如下:
[ERROR] Failed to execute goal on project acgist: Could not resolve dependencies for project com.acgist:acgist:war:1.0.0: The following artifacts could not be resolved: xxxx in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/DependencyResolutionException
这里面有一些包是我们本地的仓库,所以一般都会替换setting.xml
,但是我开始替换的是root用户目录下面的.m2/setting.xml
,但是启动jenkins的用户是jenkins,所以这个配置文件时没有效果的,所以直接修改MAVEN_HOME/conf/setting.xml
才有效果。