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