Maven 更換遠程倉庫地址


1.第一種方式,通過setting.xml的方式配置數據源

該文件路徑D:\IDE\apache-maven-3.2.3\conf\setting.xml

該文件大部分內容都已經注釋,我們需要添加如下內容:

<profile>
        <id>dev</id>  
        <!-- repositories and pluginRepositories here-->  
        <repositories>
            <repository>
                <id>nexus-aliyun</id>
                <name>Nexus aliyun</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
    </profile>
</profiles>
<activeProfiles>
    <activeProfile>dev</activeProfile>  
</activeProfiles>

 


免責聲明!

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



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