配置Maven镜像

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

打开D:\Program Files\apache-maven-3.5.4\conf目录下的setting.xml文件,将下方代码复制上去


<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>alimavenid>
            <mirrorOf>centralmirrorOf>
            <name>aliyun mavenname>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/url>
        mirror>

        
        <mirror>
            <id>repo1id>
            <mirrorOf>centralmirrorOf>
            <name>Human Readable Name for this Mirror.name>
            <url>http://repo1.maven.org/maven2/url>
        mirror>

        
        <mirror>
            <id>repo2id>
            <mirrorOf>centralmirrorOf>
            <name>Human Readable Name for this Mirror.name>
            <url>http://repo2.maven.org/maven2/url>
        mirror>
    mirrors>
settings>

你可能感兴趣的:(spring,maven,apache)