首页 > 技术文章 > IntelliJ IDEA maven库下载依赖包速度慢的问题

rachelgarden 2019-06-10 15:39 原文

在pom.xml中添加maven 依赖包时,我就发现不管是否用了FQ,下载速度都好慢,就1M的东西能下半天,很是苦恼,于是到网上搜资料,然后让我查到了。说是使用阿里的maven镜像就可以了。我于是亲自试了下,速度快的飞起!!!

 

右键项目选中maven选项,然后选择“open settings.xml”或者 “create settings.xml”,在<mirrors>标签内将以下代码粘贴进去

 

<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>

<mirror>
<id>uk</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://uk.maven.org/maven2/</url>
</mirror>

<mirror>
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>

<mirror>
<id>nexus</id>
<name>internal nexus repository</name>
<!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
<url>http://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>


引用地址:https://blog.csdn.net/qq1501340219/article/details/54638158

推荐阅读