在eclipse导入maven项目的时候卡住了,如何解决这个问题
阿神
阿神 2017-04-24 09:13:59
0
2
1747

我也知道这个是:由于某种原因,jar包下载不了,然后就一直卡着,求比较完整的解决方案?

阿神
阿神

闭关修行中......

reply all(2)
PHPzhong

Wait, wait, wait. . . . . . . . . . . . . . . . . . . . . . . . . . Wait for it to finish!

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. . .


The following is the text

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.).

settings.xml

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>
阿神

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;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template