解决idea下载依赖包慢到出奇

右键项目选中maven选项,然后选择“open settings.xml”或者 “create settings.xml”,然后把如下代码粘贴进去就可以了。重启IDE。

 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
 3           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4           xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
 5     <mirrors> <!-- mirror
 6          | Specifies a repository mirror site to use instead of a given repository. The repository that
 7          | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
 8          | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
 9          |
10         <mirror>
11           <id>mirrorId</id>
12           <mirrorOf>repositoryId</mirrorOf>
13           <name>Human Readable Name for this Mirror.</name>
14           <url>http://my.repository.com/repo/path</url>
15         </mirror>
16          -->
17         <mirror>
18             <id>alimaven</id>
19             <name>aliyun maven</name>
20             <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
21             <mirrorOf>central</mirrorOf>
22         </mirror>
23         <mirror>
24             <id>uk</id>
25             <mirrorOf>central</mirrorOf>
26             <name>Human Readable Name for this Mirror.</name>
27             <url>http://uk.maven.org/maven2/</url>
28         </mirror>
29         <mirror>
30             <id>CN</id>
31             <name>OSChina Central</name>
32             <url>http://maven.oschina.net/content/groups/public/</url>
33             <mirrorOf>central</mirrorOf>
34         </mirror>
35         <mirror>
36             <id>nexus</id>
37             <name>internal nexus repository
38             </name> <!-- <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     </mirrors>
43 </settings>

 

posted on 2019-02-14 16:16  Liuyt_61 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/Liuyt-61/p/10375211.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值