添加阿里云maven镜像

530 阅读1分钟

有的时候博客内容会有变动,首发博客是最新的,其他博客地址可能会未同步,认准https://blog.zysicyj.top

首发博客地址

文章更新计划

文章更新计划


打开 maven 的配置文件( windows 机器一般在 maven 安装目录的 conf/settings.xml ),在标签中添加 mirror 子节点:

 <mirror>
      <id>aliyunmaven</id>
      <mirrorOf>*</mirrorOf>
      <name>阿里云公共仓库</name>
      <url>https://maven.aliyun.com/repository/public</url>
    </mirror>
    <mirror>
      <id>aliyunmaven</id>
      <mirrorOf>*</mirrorOf>
      <name>阿里云公共仓库snapshots</name>
      <url>https://maven.aliyun.com/repository/apache-snapshots</url>
    </mirror>

在你的 pom.xml 文件节点中加入你要引用的文件信息:

<dependency>
  <groupId>[GROUP_ID]</groupId>
  <artifactId>[ARTIFACT_ID]</artifactId>
  <version>[VERSION]</version>
</dependency>

本文由mdnice多平台发布