IDEA配置maven镜像

打开IntelliJ IDEA->Settings ->Build, Execution, Deployment -> Build Tools > Maven

override User settings file, 在<mirrors></mirrors>中添加alimaven.

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

pom.xml 配置

1
2
3
4
5
6
7
8
9
10
11
12
13
<repositories>  
<repository>
<id>alimaven</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>
</repositories>