maven默认的仓库实在国外的,我们在国内使用很慢,所以就更换为阿里的仓库
首先修改maven根目录下conf文件夹中的setting.xml
eclipse更换maven仓库的方法也是一样的要修改setting.xml文件,windows->preferences->Maven->User Settings->Global Settings(open file)
打开文件我们就能修改了,找到mirrors节点
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
CTRL+s 保存就可以了