eclipse在第一次编译maven项目时,会下载很多maven的插件,如果什么都没做的话,就会从默认的官网仓库地址下载。
但是默认地址下载会非常的缓慢,这时候替换成国内地址会快很多。
http://maven.aliyun.com/nexus/content/groups/public/
操作步骤:
1、找到settings.xml文件。(idea中 file->settings->Maven 就可以看到地址了)

2、修改settings.xml文件
找到<mirrors>标签在里面添加代码
<mirror>
<id>mirrorId</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</mirror>
然后保存,重启IDEA就好了。
本文介绍如何通过更换Maven仓库地址至阿里云,来加快Eclipse和IntelliJ IDEA中Maven项目的编译速度。具体操作包括找到settings.xml文件并修改其中的mirror配置。
1万+

被折叠的 条评论
为什么被折叠?



