maven:多個鏡像配置


<mirrors>
    
    <mirror>
        <id>nexus-aliyun</id>
        <mirrorOf>nexus-aliyun</mirrorOf>
        <name>Nexus aliyun</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>

    <mirror>
        <id>central</id>
        <name>Maven Repository Switchboard</name>
        <url>http://repo1.maven.org/maven2/</url>
        <mirrorOf>central</mirrorOf>
    </mirror>
    <mirror>
        <id>repo2</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>http://repo2.maven.org/maven2/</url>
    </mirror>
    
    <mirror>
        <id>jboss-public-repository-group</id>
        <mirrorOf>central</mirrorOf>
        <name>JBoss Public Repository Group</name>
        <url>http://repository.jboss.org/nexus/content/groups/public</url>
    </mirror>

</mirrors>

第一個鏡像配置的是阿里雲的,在國內算速度比較快的,但是不能把<mirrorOf>nexus-aliyun</mirrorOf>  寫成<mirrorOf>*</mirrorOf> ,這樣的話阿里鏡像庫就代理了所有的倉庫,結果是有些資源無法找到(阿里庫里面資源不全)。


免責聲明!

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



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