国内 maven 仓库镜像地址收集

本文指导如何修改.m2/settings.xml配置文件,以使用阿里云和华为的Maven仓库镜像,提升项目依赖下载速度。适合开发人员了解和配置常见仓库镜像。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

修改配置文件 ~/.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">

  <mirrors>
  
    <mirror>
      <id>aliyun-central</id>
      <mirrorOf>central</mirrorOf>
      <name>阿里云 maven 仓库镜像</name>
      <url>https://maven.aliyun.com/repository/public/</url>
    </mirror>
    
    <mirror>
      <id>huaweicloud</id>
      <mirrorOf>central</mirrorOf>
      <name>华为 maven 仓库镜像</name>
      <url>https://repo.huaweicloud.com/repository/maven/</url>
    </mirror>
    
  </mirrors>

</settings>

阿里云 maven 仓库镜像介绍:https://developer.aliyun.com/mvn/guide
华为开源镜像站:https://mirrors.huaweicloud.com/home

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值