提高maven中jar包的下载速度

  maven下载jar包的默认仓库是http://my.repository.com/repo/path速度较慢,通过配置国内镜像提高下载速度

1.打开eclipse--->Window--->Preferences--->选择Maven下的User Settings 如图找到User Settings路径中的settings.xml文件

2.使用notepad++等文本编辑器打开文件进行修改

 1 <mirrors>
 2   <!-- mirror
 3     Specifies a repository mirror site to use instead of a given repository. The repository that
 4     this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
 5     for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
 6   <mirror>
 7     <id>mirrorId</id>
 8     <mirrorOf>repositoryId</mirrorOf>
 9     <name>Human Readable Name for this Mirror.</name>
10     <url>http://my.repository.com/repo/path</url>
11   </mirror>
12    -->
13 
14   <mirror>
15     <id>alimaven</id>
16     <name>aliyun maven</name>
17     <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
18     <mirrorOf>central</mirrorOf>
19   </mirror>
20 
21   <mirror>
22     <id>uk</id>  
23     <mirrorOf>central</mirrorOf>  
24     <name>Human Readable Name for this Mirror.</name>  
25     <url>http://uk.maven.org/maven2/</url>
26   </mirror>
27 
28    <mirror>
29     <id>CN</id>
30     <name>OSChina Central</name>
31     <url>http://maven.oschina.net/content/groups/public/</url>
32     <mirrorOf>central</mirrorOf>
33   </mirror>
34 
35   <mirror>
36     <id>nexus</id>
37     <name>internal nexus repository</name>
38     <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
39     <url>http://repo.maven.apache.org/maven2</url>
40     <mirrorOf>central</mirrorOf>
41   </mirror>
42 
43 </mirrors>

享受设置以后飞一般的感觉....

 

转载于:https://www.cnblogs.com/disheng2016/p/6266523.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值