Maven修改鏡像倉庫地址


修改maven根目錄下的conf文件夾中的setting.xml文件,如果你修改了默認倉庫的存儲位置,即.m2文件夾下沒有本地倉庫,但是有個setting.xml文件,那就修改這個文件就可以。

具體內容和示意圖如下:


  1. <mirror>
  2.   <id>alimaven</id>
  3.   <name>aliyun maven</name>
  4.   <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  5.   <mirrorOf>central</mirrorOf>
  6. </mirror>


Maven 中央存儲庫 – http://search.maven.org


#收集的比較快的maven倉庫
http://maven.wso2.org/nexus/content/groups/public/
http://jcenter.bintray.com/
http://maven.antelink.com/content/repositories/central/
http://nexus.openkoala.org/nexus/content/groups/Koala-release/
http://maven.tmatesoft.com/content/groups/public/
http://mavensync.zkoss.org/maven2/
http://maven.springframework.org/release/

<mirror> <id>UK</id> <name>UK Central</name> <url>http://uk.maven.org/maven2</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>sonatype</id> <name>sonatype Central</name> <url>http://repository.sonatype.org/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>jboss-public-repository-group</id> <name>JBoss Public Repository Group</name> <url>http://repository.jboss.org/nexus/content/groups/public</url> <mirrorOf>central</mirrorOf> </mirror>


其他鏡像地址:

oschina

  
  
  
          
  1. <mirror>
  2.     <id>CN</id>
  3.     <name>OSChina Central</name>                                   
  4.     <url>http://maven.oschina.net/content/groups/public/</url>
  5.     <mirrorOf>central</mirrorOf>
  6. </mirror>

repo2

  
  
  
          
  1. <mirror>  
  2.     <id>repo2</id>  
  3.     <mirrorOf>central</mirrorOf>  
  4.     <name>Human Readable Name for this Mirror.</name>  
  5.     <url>http://repo2.maven.org/maven2/</url>  
  6. </mirror>

net-cn 

  
  
  
          
  1. <mirror>  
  2.     <id>net-cn</id>  
  3.     <mirrorOf>central</mirrorOf>  
  4.     <name>Human Readable Name for this Mirror.</name>  
  5.     <url>http://maven.net.cn/content/groups/public/</url>   
  6. </mirror>

uk

  
  
  
          
  1. <mirror>  
  2.     <id>uk</id>  
  3.     <mirrorOf>central</mirrorOf>  
  4.     <name>Human Readable Name for this Mirror.</name>  
  5.     <url>http://uk.maven.org/maven2/</url>  
  6. </mirror>

ibiblio 

  
  
  
          
  1. <mirror>  
  2.     <id>ibiblio</id>  
  3.     <mirrorOf>central</mirrorOf>  
  4.     <name>Human Readable Name for this Mirror.</name>  
  5.     <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>  
  6. </mirror>

jboss

  
  
  
          
  1. <mirror>  
  2.     <id>jboss-public-repository-group</id>  
  3.     <mirrorOf>central</mirrorOf>  
  4.     <name>JBoss Public Repository Group</name>  
  5.     <url>http://repository.jboss.org/nexus/content/groups/public</url>  
  6. </mirror>





免責聲明!

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



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