Heim > Fragen und Antworten > Hauptteil
PHPz2017-04-24 09:15:59
lz下载的资源是从http://repo.maven.apache.org/...的中央库下载!而这个地址是国外地址,在正常情况下,国内下载国外的资源相对来说是比较慢,但是也不会很慢,之所以这么慢,就得予以党给我们的‘保护’!哈哈哈。。。
上面说了你为什么会卡!你用国外地址下载资源当然卡!不卡你卡谁???解决这个问题的根本就是改变下载资源的地址,把它改成国内的maven资源仓库(oschian.net、taobao.com、baidu.com等)。
把Maven的settings.xml里的mirrors地址改了
<mirrors>
<!-- mirror | Specifies a repository mirror site to use instead of a given
repository. The repository that | this mirror serves has an ID that matches
the mirrorOf element of this mirror. IDs are used | for inheritance and direct
lookup purposes, and must be unique across the set of mirrors. | -->
<mirror>
<id>nexus-osc</id>
<mirrorOf>central</mirrorOf>
<name>Nexus osc</name>
<url>http://maven.oschina.net/content/groups/public/</url>
</mirror>
<mirror>
<id>nexus-osc-thirdparty</id>
<mirrorOf>thirdparty</mirrorOf>
<name>Nexus osc thirdparty</name>
<url>http://maven.oschina.net/content/repositories/thirdparty/</url>
</mirror>
</mirrors>
阿神2017-04-24 09:15:59
1、估计是网络问题,换一个仓库试试,比如阿里的,如下:
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
2、换了之后建议删掉本地仓库里已经下载的全部jar包;