Maven的阿里云的远程中央仓库配置

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,可以发现刚配置好的阿里云镜像和本地仓库


 

posted @ 2020-07-30 22:21  Mr_sven  阅读(5789)  评论(0编辑  收藏  举报