1.找到maven解压路径下的setting.xml文件
2.添加镜像节点(我的是添加为阿里云镜像)
<mirrors>
<!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
3.重启eclipse 。ok
本文介绍如何在Maven中配置阿里云镜像以提高依赖下载速度。主要内容包括:定位到Maven安装目录下的setting.xml文件;添加阿里云镜像配置节点;重启Eclipse使配置生效。
7304

被折叠的 条评论
为什么被折叠?



