maven几个加速地址配置

主要包含了阿里云,华为云以及腾讯云的镜像,profile 部分是可以不用的,使用镜像就可以了

参考配置文件

<?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>nexus-aliyun</id>  
      <mirrorOf>central</mirrorOf>  
      <name>Nexus aliyun</name>  
      <url>http://maven.aliyun.com/nexus/content/groups/public</url> 
    </mirror>  
    <mirror> 
      <id>nexus-tencentyun</id>  
      <mirrorOf>*</mirrorOf>  
      <name>Nexus tencentyun</name>  
      <url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url> 
    </mirror>  
    <mirror> 
      <id>huaweicloud</id>  
      <mirrorOf>*</mirrorOf>  
      <url>https://repo.huaweicloud.com/repository/maven/</url> 
    </mirror> 
  </mirrors>  
  <profiles> 
    <profile> 
      <id>nexus-my</id>  
      <!--Enable snapshots for the built in central repo to direct -->  
      <!--all requests to nexus via the mirror -->  
      <repositories> 
        <repository> 
          <id>central</id>  
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
          <releases>
            <enabled>true</enabled>
          </releases>  
          <snapshots>
            <enabled>true</enabled>
          </snapshots> 
        </repository> 
      </repositories>  
      <pluginRepositories> 
        <pluginRepository> 
          <id>central</id>  
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>  
          <releases>
            <enabled>true</enabled>
          </releases>  
          <snapshots>
            <enabled>true</enabled>
          </snapshots> 
        </pluginRepository> 
      </pluginRepositories> 
    </profile> 
  </profiles>  
  <activeProfiles> 
    <activeProfile>local-repositories</activeProfile>  
    <activeProfile>central</activeProfile>  
    <activeProfile>default-build-param</activeProfile> 
  </activeProfiles> 
</settings>
 

posted on 2021-02-06 23:23  荣锋亮  阅读(536)  评论(0编辑  收藏  举报

导航