maven中央仓库太慢的解决办法

在.m2目录下创建settings.xml文件,文件内容如下:

<?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">

    <localRepository>
        /Users/dengchao/.m2/repository
    </localRepository>

    <pluginGroups></pluginGroups>

    <proxies></proxies>

    <servers></servers>

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

    <profiles></profiles>

</settings>

posted @ 2020-03-04 15:35  古语云  阅读(955)  评论(0编辑  收藏  举报