本文介紹了maven下載jar包改用阿里云maven庫的方法,分享給大家,具體如下:
修改maven安裝路徑中conf文件夾下的setting.xml文件
1
2
3
4
5
6
7
8
|
< mirrors > < mirror > < id >alimaven</ id > < name >aliyun maven</ name > < url >http://maven.aliyun.com/nexus/content/groups/public/</ url > < mirrorOf >*</ mirrorOf > </ mirror > </ mirrors > |
之后下載速度會很快
方法二:
直接在pom文件里更改 :
1
2
3
4
5
6
7
8
9
10
11
|
<!-- 阿里云maven倉庫 --> < repositories > < repository > < id >public</ id > < name >aliyun nexus</ name > < url >http://maven.aliyun.com/nexus/content/groups/public/</ url > < releases > < enabled >true</ enabled > </ releases > </ repository > </ repositories > |
添加這段
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持服務器之家。
原文鏈接:https://www.jianshu.com/p/d12af46dcf6b