settings.xml
由於中央倉庫在國內不是很穩定,但是2021年阿里雲也有點抽風,所以建議換着使用,國內同步中央倉庫源的不是很多。
其中非常建議使用nju
(南京大學),其次使用阿里雲和騰訊雲以及華為雲,當然假如您網絡不受影響,還是建議中央庫。
<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>C:\code\java\apache-maven-3.8.1-bin\repository</localRepository>
<interactiveMode />
<usePluginRegistry />
<offline />
<pluginGroups />
<servers />
<mirrors>
<mirror>
<id>nju_mirror</id>
<mirrorOf>central</mirrorOf>
<url>https://repo.nju.edu.cn/repository/maven-public/</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun</name>
<url>https://maven.aliyun.com/repository/central</url>
</mirror>
<mirror>
<id>sjtugmaven</id>
<mirrorOf>central</mirrorOf>
<name>sjtug maven</name>
<url>https://mirrors.sjtug.sjtu.edu.cn/maven-central/</url>
</mirror>
<mirror>
<id>nexus-tencentyun</id>
<mirrorOf>central</mirrorOf>
<name>tencent</name>
<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
</mirror>
<mirror>
<id>huaweicloud</id>
<mirrorOf>central</mirrorOf>
<name>HuaWei</name>
<url>https://repo.huaweicloud.com/repository/maven/</url>
</mirror>
<mirror>
<id>apachemaven</id>
<mirrorOf>central</mirrorOf>
<name>apache repo</name>
<url>https://repo.maven.apache.org/maven2/</url>
</mirror>
<mirror>
<id>repomaven</id>
<mirrorOf>central</mirrorOf>
<name>central repo</name>
<url>https://repo1.maven.org/maven2/</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>apache snapshots</mirrorOf>
<name>aliyun apache</name>
<url>https://maven.aliyun.com/repository/apache-snapshots</url>
</mirror>
</mirrors>
</settings>