• maven国内镜像(maven下载慢的解决方法)


    本文转载自:http://www.cnblogs.com/xiongxx/p/6057558.html

    Maven是当前流行的项目管理工具,但官方的库在国外经常连不上,连上也下载速度很慢。国内oschina的maven服务器很早之前就关了。今天发现阿里云的一个中央仓库,亲测可用。

    <mirror>
        <id>alimaven</id>
        <mirrorOf>central</mirrorOf>
        <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
    </mirror>

    修改${maven.home}/conf或者${user.home}/.m2文件夹下的settings.xml文件,在<mirrors>标签下加入上述内容即可。如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
        <mirrors>
            <!-- 阿里云仓库 -->
            <mirror>
                <id>alimaven</id>
                <mirrorOf>central</mirrorOf>
                <name>aliyun maven</name>
                <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
            </mirror>
        
            <!-- 中央仓库1 -->
            <mirror>
                <id>repo1</id>
                <mirrorOf>central</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://repo1.maven.org/maven2/</url>
            </mirror>
        
            <!-- 中央仓库2 -->
            <mirror>
                <id>repo2</id>
                <mirrorOf>central</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://repo2.maven.org/maven2/</url>
            </mirror>
        </mirrors> 
    </settings>
  • 相关阅读:
    CIL中间语言浅谈
    keepalived实现nginx高可用
    centos 开启关闭网卡
    CentOS7下安装httpd服务
    freeswitch socket连接报错
    centos安装nodejs
    CronTrigger
    mysql 表增加索引
    FreeSWITCH呼叫参数之sip_cid_type
    中继网关开启呼入
  • 原文地址:https://www.cnblogs.com/wpcnblog/p/6397251.html
Copyright © 2020-2023  润新知