Idea的maven镜像配置

由于使用maven下载依赖的时候需要去国外的仓库下载,下载特别慢。

所以我们可以设置阿里云镜像,直接从阿里云的仓库下载依赖,下载就特别快了

1.创建Maven的配置文件

创建settings.xml或者修改你已有的settings.xml

内容如下

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <mirrors>
     <mirror>
     <id>nexus-aliyun</id>
    <mirrorOf>central</mirrorOf>
    <name>Nexus aliyun</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>
  </mirrors>
</settings>

2.在Idea中指定Maven的配置文件

3.Maven各配置的意思

猜你喜欢

转载自blog.csdn.net/qq_46335546/article/details/129756409
今日推荐