写Java
的难免要接触Maven
,又或者Gradle
(反正都用着Maven的库)。BUT!http://repo1.maven.org/maven2
访问起来十分慢。
网上各位博主通常给出的使用阿里云镜像库的方法是修改~/.m2/settings.xml
,在mirrors
节点下添加
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
在使用IDEA时,我查看下载地址还是从 http://repo1.maven.org/maven2
这里进行下载jar包,速度十分慢。
最终解决方案
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central</url>
</mirror>