天天看點

maven換阿裡鏡像倉庫

<?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>
<!–給定倉庫的下載下傳鏡像。 –>
<mirror>
<!–該鏡像的唯一辨別符。id用來區分不同的mirror元素。 –>
<id>cn</id>
<!–鏡像名稱 –>
<name>PlanetMirror Australia</name>
<!–該鏡像的URL。建構系統會優先考慮使用該URL,而非使用預設的伺服器URL。 –>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<!–被鏡像的伺服器的id。例如,如果我們要設定了一個Maven中央倉庫(http://repo.maven.apache.org/maven2/)的鏡像,就需要将該元素設定成central。這必須和中央倉庫的id central完全一緻。–>
<mirrorOf>central</mirrorOf>
</mirror>

<mirror>
<id>ui</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://uk.maven.org/maven2/</url>
</mirror>

<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</mirror>
</mirrors>
</settings>