國內鏡像:阿里Maven源 https://maven.aliyun.com/mvn/view
打開IntelliJ IDEA->Settings ->Build, Execution, Deployment -> Build Tools > Maven
或者直接搜索maven
具體如下圖所示:
而一般情況下在c:\Users\xxx.m2
這個目錄下面如果沒有沒有settings.xml文件和repository文件夾,我們可以新建一個
settings.xml文件下的內容是:直接粘貼復制保存在上圖所示的目錄下面就可以了
<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
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>