zoukankan      html  css  js  c++  java
  • Maven 项目使用开源中国镜像

    从maven中央库下载jar非常缓慢甚至有时候会下载不下来。

    可以采用中国的maven镜像。目前主要是 开源中国的镜像。

    1. 找到maven配置文件setting.xml,打开

    2. 中间添加开源中国的配置:

    <!-- 开源中国 -->
    <mirror>  
            <id>CN</id>  
            <name>OSChina Central</name>                                                                                                                         
            <url>http://maven.oschina.net/content/groups/public/</url>  
            <mirrorOf>central</mirrorOf>  
          </mirror> 
     <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>osc_thirdparty</id>
    		<mirrorOf>thirdparty</mirrorOf>
    		<url>http://maven.oschina.net/content/repositories/thirdparty/
    		</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> 
    
    

    修改完成后保存
    3. 重启eclipse,即可开源中国或者其他仓库去下载jar包

  • 相关阅读:
    day74test
    day73
    drf节流
    drf面试题及总结
    day72test
    日常积累
    windows 内核下获取进程路径
    转:浅析C++中的this指针
    vc 获取窗口标题GetWindowText
    驱动自定义回调例程
  • 原文地址:https://www.cnblogs.com/wwyz/p/5518520.html
Copyright © 2011-2022 走看看