浅谈Maven镜像更换为阿里云中央仓库(精)
作者:tengxing007 时间:2022-08-06 04:48:17
前言
每次update Maven Project 的时候,看着进度条寸步难行,心里憋得十分难受,明显阻碍我学习的热情。
maven仓库默认在国外,使用难免很慢,尤其是下载依赖的时候,换为国内镜像,让你感受飞一般的感觉。国内支持maven镜像的有阿里云,开源中国等,这里换为阿里云的。
更换
修改maven配置文件settings.xml (当然也可以在用户home目录.m2下面添加一个settings.xml文件)
$ cd $M2_HOME/conf/
$ sudo vim settings.xml
只需在mirrors节点里面加上一个mirror子节点,内容如下:
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
保存即可。
结束语
来源:http://blog.csdn.net/tengxing007/article/details/72588242
标签:阿里云,maven,镜像
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Jenkins+Maven+SVN自动化部署java项目
2021-06-01 11:28:27
![](https://img.aspxhome.com/file/2023/7/61837_0s.png)
SpringBoot如何获取Kafka的Topic列表
2023-11-26 16:01:52
![](https://img.aspxhome.com/file/2023/2/60242_0s.png)
servlet异步请求的实现
2023-07-14 17:11:38
![](https://img.aspxhome.com/file/2023/4/57724_0s.png)
详解Java线程池队列中的延迟队列DelayQueue
2023-08-30 01:22:04
C#实现类似新浪微博长URL转短地址的方法
2023-06-02 12:59:28
Redis集群与SSM整合使用方法
2023-07-02 02:17:05
![](https://img.aspxhome.com/file/2023/0/67180_0s.png)
Java class文件格式之特殊字符串_动力节点Java学院整理
2022-02-11 14:45:59
关于统计数字问题的算法
2023-11-03 00:33:32
Spring整合junit的配置过程图解
2022-12-18 16:37:48
![](https://img.aspxhome.com/file/2023/5/66975_0s.png)
IDEA设置背景为自定义照片的操作方法
2022-12-28 09:13:08
![](https://img.aspxhome.com/file/2023/5/61645_0s.jpg)
Mybatis-Plus注入SQL原理分析
2022-11-09 21:17:22
![](https://img.aspxhome.com/file/2023/6/64496_0s.jpg)
java二维数组指定不同长度实例方法
2021-07-13 06:02:09
Java-String类最全汇总(下篇)
2023-11-09 14:45:26
![](https://img.aspxhome.com/file/2023/7/58857_0s.jpg)
Java 用反射设置对象的属性值实例详解
2023-11-26 03:56:51
struts1之简单mvc示例_动力节点Java学院整理
2021-10-28 14:43:03
![](https://img.aspxhome.com/file/2023/5/68545_0s.png)
详细聊聊SpringBoot中动态切换数据源的方法
2023-11-24 04:07:49
![](https://img.aspxhome.com/file/2023/9/59879_0s.png)
有关Java中的BeanInfo介绍
2023-08-05 00:13:42
![](https://img.aspxhome.com/file/2023/5/57955_0s.jpg)
Mac OS下为Android Studio编译FFmpeg解码库的详细教程
2023-06-30 02:37:54
Java基础之反射详解
2022-06-16 12:25:11
![](https://img.aspxhome.com/file/2023/5/61955_0s.png)
SpringBoot使用@ResponseBody返回图片的实现
2023-11-28 04:41:24
![](https://img.aspxhome.com/file/2023/4/60414_0s.jpg)