1.修改localRepository,变更为自定义目录
<localRepository>D:\maven\repository</localRepository>
2.mirrors标签下,添加镜像,采用阿里的镜像
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
<mirror>
<id>aliyunpublic</id>
<name>aliyunpublic</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>public</mirrorOf>
</mirror>
<mirror>
<id>centralmaven</id>
<mirrorOf>centralmaven</mirrorOf>
<name>centralmaven</name>
<url>http://central.maven.org/maven2/</url>
</mirror>
3.profiles标签下,添加profile
<profile>
<id>default</id>
<repositories>
<repository>
<id>nexus</id>
<name>local private nexus</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>local private nexus</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>