maven配置之使用阿里云仓库


maven配置之使用阿里云仓库

1、在项目的pom.xml里直接加入

<repositories><!-- 代码库 -->  
    <repository>  
        <id>maven-ali</id>  
        <url>http://maven.aliyun.com/nexus/content/groups/public//</url>;  
        <releases>  
            <enabled>true</enabled>  
        </releases>  
        <snapshots>  
            <enabled>true</enabled>  
            <updatePolicy>always</updatePolicy>  
            <checksumPolicy>fail</checksumPolicy>  
        </snapshots>  
    </repository>  
</repositories>

2、在$MAVEN_HOME的conf文件夹的setting.xml的标签里加入

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


免责声明!

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



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