配置maven的mirror(镜像)

配置
修改maven根目录下的conf文件夹中的setting.xml文件,内容如下:

<mirrors>
 <mirror>
        <id>alimavenid>
        <name>aliyun mavenname>
        <url>http://maven.aliyun.com/nexus/content/groups/public/url>
        <mirrorOf>centralmirrorOf>
    mirror>
    <mirror>
        <id>centralid>
        <name>Maven Repository Switchboardname>
        <url>http://repo1.maven.org/maven2/url>
        <mirrorOf>centralmirrorOf>
    mirror>
    <mirror>
        <id>repo2id>
        <mirrorOf>centralmirrorOf>
        <name>Human Readable Name for this Mirror.name>
        <url>http://repo2.maven.org/maven2/url>
    mirror>
    <mirror>
        <id>ibiblioid>
        <mirrorOf>centralmirrorOf>
        <name>Human Readable Name for this Mirror.name>
        <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/url>
    mirror>
    <mirror>
        <id>jboss-public-repository-groupid>
        <mirrorOf>centralmirrorOf>
        <name>JBoss Public Repository Groupname>
        <url>http://repository.jboss.org/nexus/content/groups/publicurl>
    mirror>
    
    <mirror>
        <id>maven.net.cnid>
        <name>oneof the central mirrors in chinaname>
        <url>http://maven.net.cn/content/groups/public/url>
        <mirrorOf>centralmirrorOf>
    mirror>
mirrors>

之后就能享受如飞的maven下载速度。

你可能感兴趣的:(开发工具)