Maven的服务器在国外,有时候有些资源下载速度奇慢无比,为了加速,可以添加国内的一些镜像地址到
Maven的settings.xml(一般在apache-maven-3.6.2/conf/下)。
我电脑里有多个IDE和本地自己安装的Maven,所有使用everything直接找到所有的settings.xml文件
添加如下xml:
<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>

本文介绍如何通过修改settings.xml文件,添加国内镜像地址来加速Maven资源的下载,解决因服务器在国外导致的下载速度慢问题。只需在settings.xml中加入相应镜像配置,即可体验快速的下载速度。
最低0.47元/天 解锁文章
9621

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



