maven下载jar包缓慢解决办法

来源:互联网 发布:淘宝美工作品展示 编辑:程序博客网 时间:2024/04/29 12:05

     最近在家练手做开发,搭建好maven环境以后,下个jar速度只有1k/分钟的速度,太伤人了,上网查了以后,说的是中央仓库大家都在用,而且可能中央仓库对一下公司的IP有限制之内的东西。还好中国人够聪明,搭建了够多的mirror镜像,自己试了下确实好使,特记录下来已备后用:

    把下面的内容直接拷贝到本地maven软件安装目录下的conf文件夹下面的settings.xml文件的<mirrors>-----</mirrors>里面

====================国内OSChina提供的镜像,非常不错===================

<mirror>

      <id>CN</id>
      <name>OSChina Central</name>                                                                                                                       
      <url>http://maven.oschina.net/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>

    </mirror>

========================================================

OSChina Maven 库使用帮助

==================其他maven仓库镜像==========================

<mirror>  
      <id>repo2</id>  
      <mirrorOf>central</mirrorOf>  
      <name>Human Readable Name for this Mirror.</name>  
      <url>http://repo2.maven.org/maven2/</url>  
</mirror>  
<mirror>  
      <id>net-cn</id>  
      <mirrorOf>central</mirrorOf>  
      <name>Human Readable Name for this Mirror.</name>  
      <url>http://maven.net.cn/content/groups/public/</url>   
</mirror>  
<mirror>  
      <id>ui</id>  
      <mirrorOf>central</mirrorOf>  
      <name>Human Readable Name for this Mirror.</name>  
     <url>http://uk.maven.org/maven2/</url>  
</mirror>  
<mirror>  
      <id>ibiblio</id>  
      <mirrorOf>central</mirrorOf>  
      <name>Human Readable Name for this Mirror.</name>  
     <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>  
</mirror>  
<mirror>  
      <id>jboss-public-repository-group</id>  
      <mirrorOf>central</mirrorOf>  
      <name>JBoss Public Repository Group</name>  
     <url>http://repository.jboss.org/nexus/content/groups/public</url>  
</mirror>

   

0 0