全局配置
修改在maven安装目录下的cong文件夹中settting文件
在mirrors标签下添加子节点。
<mirror> <id>nexus-aliyun</id> <mirrorOf>central</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror>
< mirrorOf>可以设置为指定中央仓库做镜像。
< mirrorOf>central< /mirrorOf> 为名为“central”的中央仓库做镜像;
< mirrorOf>*< /mirrorOf> 为所有中央仓库做镜像。
Maven默认中央仓库的id 为 central。id是唯一的。