maven设置镜像地址


方法一:在maven文件夹下的settings.xml中添加(对所有的项目都有效)

     <mirror>
           <id>alimaven</id>
           <name>aliyun maven</name>
           <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
           <mirrorOf>central</mirrorOf>
     </mirror>

方法二:在maven项目的pom.xml中添加(对当前项目有效)

     <!-- 使用aliyun镜像 -->
     <repositories>
           <repository>
                <id>aliyun</id>
                <name>aliyun</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public</url>
           </repository>
     </repositories>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM