1.打開maven解壓的文件,找到config目錄下面的settings.xml文件
2.在settings.xml文件中添加阿里雲的地址
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
3.在控制台輸入 mvn help:system
eclipse中修改本地倉庫地址
(1)打開eclipse,在Windows - preferences - Maven - User Setting中指定Global Settings為配置好的本地倉庫地址:D:\apache-maven-3.6.1-bin\apache-maven-3.6.1\conf\settings.xml,第三項:Local Repository會自動根據Global Settings中settings.xml中的配置變化

(2)點擊Eclipse中Window - Show View - Other

(3)選擇Maven 中Maven Responsitories,可以發現剛配置好的阿里雲鏡像和本地倉庫
