美文网首页
maven配置aliyun仓库

maven配置aliyun仓库

作者: jinelei | 来源:发表于2020-05-21 16:24 被阅读0次
  1. 项目级别:
    在对应pom.xml中添加repository节点。
<repository>
    <id>central</id>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    <layout>default</layout>
    <releases>
        <enabled>true</enabled>
    </releases>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
</repository>
  1. 全局配置:
    在对应settings.xml中添加mirror节点。
<mirror>
    <id>nexus-aliyun</id>
    <mirrorOf>central</mirrorOf>
    <name>Nexus aliyun</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>

相关文章

网友评论

      本文标题:maven配置aliyun仓库

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