PHPz2017-04-24 09:15:59
The resources downloaded by lz are downloaded from the central library at http://repo.maven.apache.org/...! And this address is a foreign address. Under normal circumstances, domestic downloading of foreign resources is relatively slow, but it is not very slow. The reason why it is so slow is that we must be given the ‘protection’ given to us by the party! Hahaha. . .
It said above why you are stuck! Of course you use a foreign address to download resources! If you are not stuck, who will you be stuck with? ? ? The fundamental solution to this problem is to change the address of download resources to the domestic maven resource warehouse (oschian.net, taobao.com, baidu.com, etc.).
Change the mirrors address in Maven’s settings.xml
<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. It is probably a network problem. Try another warehouse, such as Alibaba’s, as follows:
<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. After changing, it is recommended to delete all jar packages that have been downloaded in the local warehouse;