快使用阿里雲的maven倉庫
自從開源中國的maven倉庫掛了之后就一直在用國外的倉庫,慢得想要砸電腦的心都有了。如果你和我一樣受夠了國外maven倉庫的龜速下載?快試試阿里雲提供的maven倉庫,從此不在浪費生命……(感謝博主http://www.cnblogs.com/keitsi/p/6000649.html)
倉庫地址:http://maven.aliyun.com/nexus/#view-repositories;public~browsestorage
倉庫配置
在maven的settings.xml文件里的mirrors節點,添加如下子節點:
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
或者直接在profiles->profile->repositories節點,添加如下子節點:
<repository> <id>nexus-aliyun</id> <name>Nexus aliyun</name> <layout>default</layout> <url>http://maven.aliyun.com/nexus/content/groups/public</url> <snapshots> <enabled>false</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </repository>
settings文件的路徑
settings.xml的默認路徑就:個人目錄/.m2/settings.xml
如:
windowns: C:\Users\你的用戶名\.m2\settings.xml
linux: /home/你的用戶名/.m2/settings.xml