在pom.xml中添加maven 依賴包時,我就發現不管是否用了翻牆,下載速度都好慢,就1M的東西能下半天,很是苦惱,於是到網上搜資料,然后讓我查到了。說是使用阿里的maven鏡像就可以了。我於是親自試了下,速度快的飛起!!!
右鍵項目選中maven選項,然后選擇“open settings.xml”或者 “create settings.xml”,在<mirrors>標簽內將以下代碼粘貼進去
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>uk</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://uk.maven.org/maven2/</url>
</mirror>
<mirror>
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>nexus</id>
<name>internal nexus repository</name>
<!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
<url>http://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
引用地址:https://blog.csdn.net/qq1501340219/article/details/54638158
