首页 > 编程语言 > 详细

加快maven中jar包的下载速度

时间:2017-01-09 21:56:14      阅读:190      评论:0      收藏:0      [点我收藏+]

  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>

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

 

加快maven中jar包的下载速度

原文:http://www.cnblogs.com/disheng2016/p/6266523.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!