修改maven根目录下的conf文件夹中的setting.xml文件,如果你修改了默认仓库的存储位置,即.m2文件夹下没有本地仓库,但是有个setting.xml文件,那就修改这个文件就可以。

具体内容和示意图如下:

  1. <mirror>
  2. <id>alimaven</id>
  3. <name>aliyun maven</name>
  4. <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  5. <mirrorOf>central</mirrorOf>
  6. </mirror>

Maven 中央存储库 – http://search.maven.org


#收集的比较快的maven仓库
http://maven.wso2.org/nexus/content/groups/public/
http://jcenter.bintray.com/
http://maven.antelink.com/content/repositories/central/
http://nexus.openkoala.org/nexus/content/groups/Koala-release/
http://maven.tmatesoft.com/content/groups/public/
http://mavensync.zkoss.org/maven2/
http://maven.springframework.org/release/

<mirror>
<id>UK</id>
<name>UK Central</name>
<url>http://uk.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror> <mirror>
<id>sonatype</id>
<name>sonatype Central</name>
<url>http://repository.sonatype.org/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror> <mirror>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
<mirrorOf>central</mirrorOf>
</mirror>


其他镜像地址:

oschina

  1. <mirror>
  2.     <id>CN</id>
  3.     <name>OSChina Central</name>                                   
  4.     <url>http://maven.oschina.net/content/groups/public/</url>
  5.     <mirrorOf>central</mirrorOf>
  6. </mirror>

repo2

  1. <mirror>  
  2.     <id>repo2</id>  
  3.     <mirrorOf>central</mirrorOf>  
  4.     <name>Human Readable Name for this Mirror.</name>  
  5.     <url>http://repo2.maven.org/maven2/</url>  
  6. </mirror>

net-cn

  1. <mirror>  
  2.     <id>net-cn</id>  
  3.     <mirrorOf>central</mirrorOf>  
  4.     <name>Human Readable Name for this Mirror.</name>  
  5.     <url>http://maven.net.cn/content/groups/public/</url>   
  6. </mirror>

uk

  1. <mirror>  
  2.     <id>uk</id>  
  3.     <mirrorOf>central</mirrorOf>  
  4.     <name>Human Readable Name for this Mirror.</name>  
  5.     <url>http://uk.maven.org/maven2/</url>  
  6. </mirror>

ibiblio

  1. <mirror>  
  2.     <id>ibiblio</id>  
  3.     <mirrorOf>central</mirrorOf>  
  4.     <name>Human Readable Name for this Mirror.</name>  
  5.     <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>  
  6. </mirror>

jboss

  1. <mirror>  
  2.     <id>jboss-public-repository-group</id>  
  3.     <mirrorOf>central</mirrorOf>  
  4.     <name>JBoss Public Repository Group</name>  
  5.     <url>http://repository.jboss.org/nexus/content/groups/public</url>  
  6. </mirror>

Maven修改镜像仓库地址的更多相关文章

  1. win10 下安装docker,创建镜像,push镜像到私有仓库,创建私有仓库,修改镜像仓库地址

    通过连接下载window docker安装文件,https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.ex ...

  2. maven修改本地仓库地址配置文件

    本地仓库是远程仓库的一个缓冲和子集,当你构建Maven项目的时候,首先会从本地仓库查找资源,如果没有,那么Maven会从远程仓库下载到你本地仓库.这样在你下次使用的时候就不需要从远程下载了.如果你所需 ...

  3. Linux下安装docker,更改镜像仓库地址,并部署springboot应用

    今天做不成的事,明天也不会做好. 各位同学大家好,随着docker的快速发展,越来越多的人开始使用,一方面随着容器化这个趋势越来越火,docker成为了其中的佼佼者:二来容器化确实降低了运维的门槛,让 ...

  4. maven设置本地仓库地址和设置国内镜像

    <?xml version="1.0" encoding="UTF-8"?> <!-- 英文注释已经被删除了,直接修改本地仓库地址用就行了. ...

  5. [转]git修改远程仓库地址

    原文链接:http://www.cnblogs.com/lazb/articles/5597878.html 问:Coding远程仓库地址变了,本地git仓库地址如何更新为最新地址 git修改远程仓库 ...

  6. CentOS Linux搭建独立SVN Server全套流程(修改svn仓库地址、服务启动等)

    CentOS Linux搭建独立SVN Server全套流程(修改svn仓库地址.服务启动等) 原 一事能狂便少年 发布于 2016/12/27 11:16 字数 1113 阅读 1.3K  收藏 0 ...

  7. maven修改本地仓库,远程仓库与中央仓库

    什么是Maven仓库 在不用Maven的时候,比如说以前我们用Ant构建项目,在项目目录下,往往会看到一个名为/lib的子目录,那里存放着各类第三方依赖jar文件,如 log4j.jar,junit. ...

  8. 批量修改git仓库地址脚本

    前言   公司的代码都存放在自己搭建的gitlab上面.之前由于老板升级gitlab.导致下面有个叫做"api"的groups无法访问.通过无所不能的谷歌才知道.在gitlab在某 ...

  9. Maven - 配置镜像仓库

    默认仓库的配置(全球中央仓库): 可以打开maven的安装目录/conf/settings.xml文件,配置镜像,找到如下一段配置,这里默认没有配置任何镜像,但是有一个被注释的配置范例: id: 镜像 ...

随机推荐

  1. unable to open sync connection

    有些时候,在你向连接好的Android机器中按照程序时会遭遇失败,logcat提示“unable to open sync connection”. 一般情况下,重启手机几乎肯定可以解决这个问题. 如 ...

  2. iOS学习笔记---oc语言第八天

    属性 能在一定程度上简化代码,并且增强实例变量的访问安全性 属性的声明:使用@property声明属性  eg:@property NSSstring *name;相当于@interface中声明了两 ...

  3. ZPPR101-批量更改BOM组件

    ************************************************************************ Title : ZPPR101 ** Applicat ...

  4. 209. Minimum Size Subarray Sum

    Given an array of n positive integers and a positive integer s, find the minimal length of a subarra ...

  5. abbyy cup a

    link: http://codeforces.com/contest/331/problem/A2 /* ID: zypz4571 LANG: C++ TASK: abby_a.cpp */ #in ...

  6. JavaWeb学习记录(十四)——商城购物之字符串拼接实现最近浏览商品和购物车的功能

    一.字符串拼接的工具类 package blank.util; import java.util.Iterator;import java.util.Map;import java.util.Set; ...

  7. spark新能优化之广播共享数据

    如果你的算子函数中,使用到了特别大的数据,那么,这个时候,推荐将该数据进行广播.这样的话,就不至于将一个大数据拷贝到每一个task上去.而是给每个节点拷贝一份,然后节点上的task共享该数据. 这样的 ...

  8. 神奇的输入 while(cin>>....)如何在遇见换行之后进入下一层循环读入

    cin>>m>>n; ;i<=m;i++) { ; char ch=' '; ) //在遇到换行之后进入下一层循环读入. { x++; cin>>c[x]; ...

  9. Windows Phone使用总结(长期更新)

    [感受和经历] 1,型号,撸妹640XL: 2,经历,去银行办卡,当然各种潜规则要我装APP,然后小妹夺我手机要帮我安装,拿过去之后又还给我了--哈哈哈哈,不过乐极生悲,我以为能成功躲过去了,发现中国 ...

  10. kuangbin_UnionFind C (HDU 1213)

    过程模板 扫一下一共有几棵树 输出 #include <iostream> #include <string> #include <cstdio> #include ...