Maven——修改中央仓库

setings.xml

<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
        <!-- mirror | Specifies a repository mirror site to use instead of a given 
            repository. The repository that | this mirror serves has an ID that matches 
            the mirrorOf element of this mirror. IDs are used | for inheritance and direct 
            lookup purposes, and must be unique across the set of mirrors. | -->
         <mirror>
            <id>alimaven</id>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
          </mirror>
        
          <mirror> 
            <id>uk</id>  
            <mirrorOf>central</mirrorOf>  
            <name>Human Readable Name for this Mirror.</name>  
            <url>http://uk.maven.org/maven2/</url> 
          </mirror>
        
           <mirror>
            <id>CN</id>
            <name>OSChina Central</name>
            <url>http://maven.oschina.net/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
          </mirror>
        
          <mirror>
            <id>nexus</id>
            <name>internal nexus repository</name>
            <url>http://repo.maven.apache.org/maven2</url>
            <mirrorOf>central</mirrorOf>
          </mirror>
    </mirrors>
 
    <profiles>
        <profile>
            <id>default</id>
            <repositories>
                <repository>
                    <id>nexus</id>
                    <name>local private nexus</name>
                    <url>http://maven.oschina.net/content/groups/public/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>nexus</id>
                    <name>local private nexus</name>
                    <url>http://maven.oschina.net/content/groups/public/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
</settings>

————Blueicex 2020/2/17 8:10 [email protected]

发布了63 篇原创文章 · 获赞 0 · 访问量 2121

猜你喜欢

转载自blog.csdn.net/blueicex2017/article/details/104352540