问题描述:
下载maven依赖的时候是否总是感觉度秒如年? 看着蠕动的下载进度条,内心是否十万个羊驼奔驰而过?
解决方法:
打开maven的settings.xml配置文件,在配置文件“mirrors”下添加依赖仓库地址镜像即可,详情如下:

<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://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
本文介绍如何通过配置Maven的settings.xml文件中的镜像仓库来加速依赖下载,包括阿里云、OSChina等多个镜像源。

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



