首页 新闻 会员 周边

Jenkins持续集成环境, 如何自定义 maven repositories

0
悬赏园豆:50 [已解决问题] 解决于 2016-06-01 19:40

一个java maven项目, 搭建Jenkins 自动构建,发布,目前手动build功能可以正常执行(BUILD SUCCESS)

但是在build时的Console Output中,一部分log如下

49267 <===[JENKINS REMOTING CAPACITY]===>channel started using settings config with name MySettings Replacing all maven server entries not found in credentials list is true Executing Maven: -B -f C:\Users\Administrator\.jenkins\jobs\GlobalOnline\workspace\pom.xml -Dmaven.repo.local=C:\Users\Administrator\.jenkins\maven-repositories\1 -s D:\dev\tomcat7\temp\settings6696587848193335832.xml clean compile

........

虽然我自定义了maven的setting.xml,里面指定了本地仓库的路径(d:\resp),用的是config plugin设定的

但是, 所有的jar包都把被下载到了C:\Users\Administrator\.jenkins\maven-repositories\1

我的问题是,如何能让我的设定生效,maven依赖的jar都下载到我的本地仓库路径中

问题补充:

最后的解决方法:

job名-->configure-->Build-->Goals and options:

clean package -Dmaven.repo.local=D:\dev\maven3.1.1\m2repository

在这里使用-Dmaven.repo.local,强制指定本地仓库的路径.

已测试.

 

码农加一的主页 码农加一 | 初学一级 | 园豆:81
提问于:2016-05-30 16:30
< >
分享
最佳答案
0

<localRepository>D:\Repository\Mvn</localRepository>都是这样配置的呀

收获园豆:50
[3] | 小虾三级 |园豆:1174 | 2016-05-30 17:58

最后的解决方法:

job名-->configure-->Build-->Goals and options:

clean package -Dmaven.repo.local=D:\dev\maven3.1.1\m2repository

在这里使用-Dmaven.repo.local,强制指定本地仓库的路径.

已测试.

码农加一 | 园豆:81 (初学一级) | 2016-06-01 19:40
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册