Maven is a popular project management tool, but the official library is often unavailable abroad, and the download speed is very slow. The maven server of oschina in China was shut down a long time ago. Today, I found a central warehouse of Alibaba Cloud, which is available for personal testing.
Modify the settings.xml file in the ${maven.home}/conf or ${user.home}/.m2 folder, and add the above content under the <mirrors> tag. As follows:
<?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 ">
<mirrors>
<!-- Alibaba Cloud Warehouse-->
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
<!-- 中央仓库1 -->
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>
<!-- 中央仓库2 -->
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
</mirrors>
</settings>
Solve the problem of slow download of Maven warehouse
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326574297&siteId=291194637
Recommended
Ranking