加快maven中jar包的下載速度,mavenjar

來源:互聯網
上載者:User

加快maven中jar包的下載速度,mavenjar

  maven下載jar包的預設倉庫是http://my.repository.com/repo/path速度較慢,通過配置國內鏡像提高下載速度

1.開啟eclipse--->Window--->Preferences--->選擇Maven下的User Settings 找到User Settings路徑中的settings.xml檔案

2.使用notepad++等文字編輯器開啟檔案進行修改

 1 <mirrors> 2   <!-- mirror 3     Specifies a repository mirror site to use instead of a given repository. The repository that 4     this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used 5     for inheritance and direct lookup purposes, and must be unique across the set of mirrors. 6   <mirror> 7     <id>mirrorId</id> 8     <mirrorOf>repositoryId</mirrorOf> 9     <name>Human Readable Name for this Mirror.</name>10     <url>http://my.repository.com/repo/path</url>11   </mirror>12    -->13 14   <mirror>15     <id>alimaven</id>16     <name>aliyun maven</name>17     <url>http://maven.aliyun.com/nexus/content/groups/public/</url>18     <mirrorOf>central</mirrorOf>19   </mirror>20 21   <mirror>22     <id>uk</id>  23     <mirrorOf>central</mirrorOf>  24     <name>Human Readable Name for this Mirror.</name>  25     <url>http://uk.maven.org/maven2/</url>26   </mirror>27 28    <mirror>29     <id>CN</id>30     <name>OSChina Central</name>31     <url>http://maven.oschina.net/content/groups/public/</url>32     <mirrorOf>central</mirrorOf>33   </mirror>34 35   <mirror>36     <id>nexus</id>37     <name>internal nexus repository</name>38     <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->39     <url>http://repo.maven.apache.org/maven2</url>40     <mirrorOf>central</mirrorOf>41   </mirror>42 43 </mirrors>

享受設定以後飛一般的感覺....

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.