在Maven安装目录下的conf/setting.xml配置相应的jar包的Repository的镜像(http://mvnrepository.com 搜索jar包。找到Repository)
主要配置:
<mirrors>
<mirror>
<id>alfresco</id>
<name>alfresco Central</name>
<url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
<mirrorOf>thirdparty</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>maven2</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>alfresco</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
</repository>
<repository>
<id>maven2</id>
<url>http://central.maven.org/maven2/</url>
</repository>
</repositories>
</profile>
</profiles>
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>E:\maven-repository</localRepository>
<pluginGroups>
</pluginGroups>
=
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>alfresco</id>
<name>alfresco Central</name>
<url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
<mirrorOf>thirdparty</mirrorOf>
</mirror>
<mirror>
<id>maven2</id>
<name>maven Central</name>
<url>http://central.maven.org/maven2/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>maven2</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>alfresco</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/public/</url>
</repository>
<repository>
<id>maven2</id>
<url>http://central.maven.org/maven2/</url>
</repository>
</repositories>
</profile>
</profiles>
</settings>