maven 倉庫下載緩慢,怎么解決


maven下載jar的時候會去尋國外的地址,因此造成了下載jar很緩慢,影響開發效率,於是就出現maven鏡像地址,可以使我們開發人員迅速下載相關的jar。

 

在maven的config的setting.xml文件中,我們發現:

mirror的配置就是為了鏡像。

 

 1 國內連接maven官方的倉庫更新依賴庫,網速一般很慢,收集一些國內快速的maven倉庫鏡像以備用。
 2 
 3 ====================國內OSChina提供的鏡像,非常不錯===================
 4 
 5 <mirror>
 6 
 7       <id>CN</id>
 8       <name>OSChina Central</name>                                                                                                                       
 9       <url>http://maven.oschina.net/content/groups/public/</url>
10       <mirrorOf>central</mirrorOf>
11 
12     </mirror>
13 
14 ========================================================
15 
16 OSChina Maven 庫使用幫助
17 
18 
19 ==================其他maven倉庫鏡像==========================
20 
21 <mirror>  
22       <id>repo2</id>  
23       <mirrorOf>central</mirrorOf>  
24       <name>Human Readable Name for this Mirror.</name>  
25       <url>http://repo2.maven.org/maven2/</url>  
26 </mirror>  
27 <mirror>  
28       <id>net-cn</id>  
29       <mirrorOf>central</mirrorOf>  
30       <name>Human Readable Name for this Mirror.</name>  
31       <url>http://maven.net.cn/content/groups/public/</url>   
32 </mirror>  
33 <mirror>  
34       <id>ui</id>  
35       <mirrorOf>central</mirrorOf>  
36       <name>Human Readable Name for this Mirror.</name>  
37      <url>http://uk.maven.org/maven2/</url>  
38 </mirror>  
39 <mirror>  
40       <id>ibiblio</id>  
41       <mirrorOf>central</mirrorOf>  
42       <name>Human Readable Name for this Mirror.</name>  
43      <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>  
44 </mirror>  
45 <mirror>  
46       <id>jboss-public-repository-group</id>  
47       <mirrorOf>central</mirrorOf>  
48       <name>JBoss Public Repository Group</name>  
49      <url>http://repository.jboss.org/nexus/content/groups/public</url>  
50 </mirror>
51 
52 
53 <mirror>  
54       <id>JBossJBPM</id> 
55     <mirrorOf>central</mirrorOf> 
56     <name>JBossJBPM Repository</name> 
57     <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
58 </mirror>
59 -------------------------spring maven--------------------------------
60 http://maven.springframework.org/release/
61 ---------------------------------------------------------------------
62 http://maven.antelink.com/content/repositories/central/
63 http://nexus.openkoala.org/nexus/content/groups/Koala-release/
64 http://maven.tmatesoft.com/content/groups/public/
65 http://mavensync.zkoss.org/maven2/

 

參考:http://www.cnblogs.com/dingyingsi/p/3856456.html

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM