maven仓库地址配置

本文介绍如何通过在pom.xml文件中设置阿里云Maven仓库地址来解决访问速度慢的问题。

# 背景

maven中央存库在国外,访问缓慢,一般国内镜像,这里推荐阿里云的 http://maven.aliyun.com/nexus/content/groups/public

我之前采用的方式是修改setting.xml文件,后续跟研发了解下,实际使用的时候不会修改这个玩意,团队协作因为你不能强制别人去修改本地setting.xml的 

而是在pom.xml中设置仓库地址就可以的 

 

# 具体

pom.xml中project节点新增如下:

<repositories>
        <!-- 远程仓库地址 -->
        <repository>
            <id>nexus-aliyun</id>  
         <name>Nexus aliyun</name>  
         <url>http://maven.aliyun.com/nexus/content/groups/public</url>  
        </repository>

</repositories>

 

转载于:https://www.cnblogs.com/jwentest/p/9346929.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值