maven默认官方的中央仓库有时候很慢下载jar甚至会卡住,那么你可以切换到阿里云的maven源
在本地的maven文件夹新建settings.xml
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21<?xml version="1.0" encoding="UTF-8"?> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <pluginGroups /> <proxies /> <servers /> <mirrors > <mirror> <id>planetmirror.com</id> <name>aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> <localRepository>C:Users你本地的路径.m2repository</localRepository> </settings>
如果你不知道本地的maven配置路径,你的打开IDEA即可。
以netty源码为例:
已经走阿里云下载了
最后
以上就是还单身樱桃最近收集整理的关于切换阿里云maven源解决maven中央仓库下载太慢卡顿的问题的全部内容,更多相关切换阿里云maven源解决maven中央仓库下载太慢卡顿内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复