IDEA中maven項目導jar包太慢


版權聲明:本文為博主原創文章,未經博主允許不得轉載。 https://blog.csdn.net/PROGRAM_anywhere/article/details/53842058
參考了網上的一些教程:
1.找到安裝maven的路徑
2.直接搜索settings.xml文件
3.我反正是找到兩個這樣的文件,一個在maven2目錄下一個在maven3目錄下,我把兩個文件的內容都改成如下:

找到
然后把下面代碼直接copy替換就好了

<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>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
     <!-- <mirror>       -->
      <!-- <id>repo2</id>       -->
      <!-- <mirrorOf>central</mirrorOf>       -->
      <!-- <name>Human Readable Name for this Mirror.</name>       -->
      <!-- <url>http://repo2.maven.org/maven2/</url>       -->
    <!-- </mirror>    -->

    <mirror>
      <!--This sends everything else to /public -->
      <id>nexus</id>
      <mirrorOf>*</mirrorOf> 
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    </mirror>
    <mirror>
      <!--This is used to direct the public snapshots repo in the 
          profile below over to a different nexus group -->
      <id>nexus-public-snapshots</id>
      <mirrorOf>public-snapshots</mirrorOf> 
      <url>http://maven.aliyun.com/nexus/content/repositories/snapshots/</url>
    </mirror>

  </mirrors>

也就是換成了阿里的源,不知道你們怎么樣。我反正是秒下



 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM