美文网首页
maven 配置阿里云镜像站

maven 配置阿里云镜像站

作者: 24号球员 | 来源:发表于2021-07-09 15:49 被阅读0次
方式一:全局配置setting.xml
<mirror>
    <id>nexus-aliyun</id>
    <name>Nexus aliyun</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url> 
    <mirrorOf>central</mirrorOf> 
</mirror>

方式二:配置项目pom.xml
<repository>
    <id>central</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>

相关文章

网友评论

      本文标题:maven 配置阿里云镜像站

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