Maven - 镜像<mirror>
使用镜像
如果你的地理位置附近有一个速度更快的central镜像,或者你想覆盖central仓库配置,或者你想为所有POM使用唯一的一个远程仓库(这个远程仓库代理的所有必要的其它仓库),你可以使用settings.xml中的mirror配置。
以下的mirror配置用maven.net.cn覆盖了Maven自带的central:
<settings>
...
<mirrors>
<mirror>
<id>maven-net-cn</id>
<name>Maven China Mirror</name>
<url>http://maven.net.cn/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
...
</settings>
这里唯一需要解释的是<mirrorOf>,这里我们配置central的镜像,我们也可以配置一个所有仓库的镜像,以保证该镜像是Maven唯一使用的仓库:
<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>nexus</id>
<mirrorOf>*</mirrorOf>
<name>Nexus Mirror</name>
<url>http://xx.xx/nexus/content/groups/public</url>
</mirror>
</mirrors>
<settings>
...
<mirrors>
<mirror>
<id>my-org-repo</id>
<name>Repository in My Orgnization</name>
<url>http://192.168.1.100/maven2</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
...
</settings>
Maven - 镜像<mirror>的更多相关文章
- 使用国内 maven 镜像 代替国外 mirror
使用maven的都知道国外的maven下载一个是比较慢,一个是因为被墙,一些jar包无法下载,非常老火. 比如出现类似下面的错误: Unknown host repo.maven.apache.org ...
- 国内maven镜像,快的飞起
在oschina关来关去的烦恼下,终于受不了去寻找其他公共库了. 阿里云maven镜像 <mirrors> <mirror> <id>alimaven</id ...
- [Java] Maven 镜像仓库
配置 修改maven根目录下的conf文件夹中的setting.xml文件. 阿里云 <mirrors> <mirror> <id>alimaven</id& ...
- 使用maven镜像
maven 的安装目录下的 conf 文件夹下有个 settings.xml 文件,编辑该文件 在<mirrors>中插入: <mirror> <id>repo2& ...
- 国内较快的maven镜像
原文网址:http://www.cnblogs.com/dingyingsi/p/3856456.html 国内连接maven官方的仓库更新依赖库,网速一般很慢,收集一些国内快速的maven仓库镜像以 ...
- [转]使用maven镜像
综述 用maven做项目,最郁闷的莫过于某些依赖库下载不了.被墙了,你懂的.使用maven镜像仓库及其重要,特别是国内的镜像,可以有效缓解被墙疼痛. 常用的镜像 国外镜像 ibiblio.org &l ...
- 【转】国内较快的maven镜像
国内连接maven官方的仓库更新依赖库,网速一般很慢,收集一些国内快速的maven仓库镜像以备用. ====================国内OSChina提供的镜像,非常不错=========== ...
- 常见maven镜像
国内连接maven官方的仓库更新依赖库,网速一般很慢,收集一些国内快速的maven仓库镜像以备用. ====================国内OSChina提供的镜像,非常不错=========== ...
- (转)maven镜像路径配置
很多maven包无法自动下载怎么办?设置maven镜像setting.xml <mirror> <id>repo2</id> <mirrorOf>cen ...
随机推荐
- SVN和GIT
一.SVN SVN使用起来还是比较简单的,我使用的SVN小乌龟版本是1.1的.(SVN已经可以正常使用了) 先说下自己了解的SVN流程吧,可能比较简单,不过这个也是实际的使用情况,忽略了很多其他功能( ...
- DevOps时代,企业数字化转型需要强大的工具链
伴随时代的飞速进步,中国的人口红利带来了互联网业务的快速发展,巨大的流量也带动了技术的不断革新,研发的模式也在不断变化.传统企业纷纷效仿互联网的做法,结合DevOps进行数字化的转型. 通常提到Dev ...
- NodeJs之EXCEL文件导入导出MongoDB数据库数据
NodeJs之EXCEL文件导入导出MongoDB数据库数据 一,介绍与需求 1.1,介绍 (1),node-xlsx : 基于Node.js解析excel文件数据及生成excel文件. (2),ex ...
- linux cp 直接覆盖不提示信息 解决方法
默认情况下,cp覆盖时,无论加什么参数 -f 之类的 还是提示是否覆盖. 原因是:服务器会默认增加别名 alias cp=’cp -i’,当你执行cp时,其实执行的是cp –i. [root@ltt0 ...
- 1.promethues监控融入k8s
文档链接地址 https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_confi ...
- day13
今日所学 1,函数的嵌套定义 2,globe nonlocal关键字 3,闭包及闭包的运用场景 4,装饰器 函数的嵌套: 在一个函数的内部定义另一个函数 1,函数2想直接使用1函数的局部变量,可以 ...
- java网页爬数据获取class中的空格
<ul class=""> <li class="avatar_img"><img src="http://avatar ...
- [HNOI2001] 产品加工
题目类型:\(DP\) 传送门:>Here< 题意:有\(N\)个零件,每个零件有三种选择,在\(A\)机器加工,在\(B\)机器加工,同时在\(AB\)加工.其中所需要的时间分别为\(t ...
- reload ans current configure command
reload ans current configure command enable_ans_license.conf enable ans license WL enable ans licens ...
- fast-ai lesson1 错误处理(CNN创建)
报错信息: name 'ConvLearner' is not defined 在最新的fast ai包中,ConvLearner已经被create_cnn取代,所以替换为下列语句就好了: learn ...