在eclipse中默认的maven,它加载的是国外的镜像,那样速度会比较慢,如果使用国内镜像,比如阿里的中央仓库;速度会快很多。
那如何修改maven仓库呢?(网上有很多如何修改maven仓库的方法,这边我是以我操作的方法,和参考网上的修改方法)
Step-2:下载完成之后,在apache-maven-3.5.0/conf文件夹下新建一个settings.xml,并在apache-maven-3.5.0文件夹下创建一个repos文件夹,用于下面在eclipse中将其设置为仓库的路径
而settings.xml的内容可以在网上找一个,settings.xml如下
?xml version="1.0" encoding="UTF-8"?>E:\apache-maven-3\apache-maven-3.5.0\repos alimaven * aliyun maven http://maven.aliyun.com/nexus/content/repositories/central/
其中核心的部分为:
alimaven * aliyun maven http://maven.aliyun.com/nexus/content/repositories/central/
Step-3:对eclipse进行修改
在window—》preferences
完成之后:切换到maven的窗口
然后重新建立索引