IDEA切换maven仓库

阿里大法好

Posted by WK on 2021-09-25
Estimated Reading Time 1 Minutes
Words 185 In Total
Viewed Times

IEAD默认的maven库下载太慢,于是乎有必要换一个更快的maven库

方法

一:找到Maven的settings.xml文件

settings.xml默认存放地址为IDEA安装路劲下的:

JetBrains\IntelliJ IDEA xxx.xxx\plugins\maven\lib\maven3\conf

复制一份settings.xml 到:C:\Users\You user.m2/

二:修改settings.xml 文件

找到

1
<mirrors> </mirrors>

标签,并添加如下阿里maven仓库配置:

1
2
3
4
5
6
<mirror> 
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>

1.png

最后修改 IDEA 中的配置File----> settings --> Build,Executon,Deployment --> Maven:找到下图位置,选择你settings.xml文件路径,勾选 Override 便可。

2.png

大功告成!


If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !