阿里云配置中央仓库

#配置方法1: 在 $MAVEN_HOME/conf 下的 settings.xml 的标签中添加如下配置:

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

#配置方法2: 在 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>  

猜你喜欢

转载自blog.csdn.net/weixin_43069201/article/details/86636345