配置远程仓库的几种方法:
1 在pom.xml里配置多个远程仓库:
nexus
nexus私服URL
http://127.0.0.1:8081/repository/maven-public/
aliyun
阿里云
http://maven.aliyun.com/nexus/content/groups/public/
缺点:每个项目都需要配置,固可以在settings.xml配置全局
2.在settings.xml里配置全局
my
aliyun
Nexus aliyun
http://maven.aliyun.com/nexus/content/groups/public
true
true
nexus
nexus私服URL
http://127.0.0.1:8081/repository/maven-public/
true
true
my
配置镜像
在settings.xml里配置阿里云镜像加速默认的远程仓库
aliyun
central
Nexus aliyun
http://maven.aliyun.com/nexus/content/groups/public
全局默认的远程仓库:
central
https://repo1.maven.org/maven2/
由于配置 central,所有从center(默认远程仓库)去拉取依赖的 都将 重定向从aliyun镜像中去拉取依赖
注:mirrorOf匹配的都是reposito