- 设置localRepository 标签
新的依赖出现,缓存到本地目标仓库
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0
https://maven.apache.org/xsd/settings-1.2.0.xsd">
<localRepository>D:/Work/.m2/repository</localRepository>
</settings>
- 设置mrrors标签
maven默认中央仓库在国外,下载速度慢,需要配置国内仓库镜像
<mirrors>
<!--阿里镜像的配置-->
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>