美文网首页
maven指定中央仓库

maven指定中央仓库

作者: ShiPF | 来源:发表于2020-05-28 09:27 被阅读0次

国内最好的maven repository
第一步:修改maven根目录下的conf文件夹中的setting.xml文件,内容如下:

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

第二步: pom.xml文件里添加

<repositories>  
        <repository>  
            <id>alimaven</id>  
            <name>aliyun maven</name>  
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
            <releases>  
                <enabled>true</enabled>  
            </releases>  
            <snapshots>  
                <enabled>false</enabled>  
            </snapshots>  
        </repository>  
</repositories> 

相关文章

网友评论

      本文标题:maven指定中央仓库

      本文链接:https://www.haomeiwen.com/subject/dckoahtx.html