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> ,這樣的話阿里鏡像庫就代理了全部的倉庫,結果是有些資源沒法找到(阿里庫裏面資源不全)。maven

相關文章
相關標籤/搜索