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>