【轉自:http://www.cnblogs.com/disheng2016/p/6266523.html】 maven下載jar包的預設倉庫是http://my.repository.com/repo/path速度較慢,通過配置國內鏡像提高下載速度 1.打開eclipse >Window >Pre ...
【轉自:http://www.cnblogs.com/disheng2016/p/6266523.html】
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>
享受設置以後飛一般的感覺....