国内maven下载比较快速的镜像地址,国内maven中央仓库地址

本文介绍如何通过修改Maven的settings.xml文件,添加国内镜像仓库来提高Maven依赖下载速度。提供了多个国内Maven仓库镜像,如阿里云、OSChina等,以及详细的配置步骤。

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

修改默认maven仓库呢?
1、打开maven的安装路径下的config文件夹,修改setting.xml文件 例如:D:\apache-maven-3.0.5\conf\settings.xml
2、添加相应的mirror标签
例如:复制下面的标签到mirrors标签下

is easy??

国内连接maven官方的仓库更新依赖库,网速一般很慢,收集一些国内快速的maven仓库镜像以备用。

 <!-- 中央仓库在中国的镜像 (推荐)-->
        <mirror>
            <id>maven.net.cn</id>
            <name>oneof the central mirrors in china</name>
            <url>http://maven.net.cn/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
        <!-- 国内OSChina提供的镜像-->
        <mirror>
			<id>CN</id>
			<name>OSChina Central</name>                                                                                                                       
			<url>http://maven.oschina.net/content/groups/public/</url>
			<mirrorOf>central</mirrorOf>
		</mirror>

原文链接:https://blog.youkuaiyun.com/qiangqiang816/article/details/81541554

其余的镜像

<mirror>
            <id>nexus-aliyun</id>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
        <mirror>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <url>http://repo1.maven.org/maven2/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
        <mirror>
            <id>repo2</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://repo2.maven.org/maven2/</url>
        </mirror>
        <mirror>
            <id>ibiblio</id>
            <mirrorOf>central</mirrorOf>
            <name>Human Readable Name for this Mirror.</name>
            <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
        </mirror>
        <mirror>
            <id>jboss-public-repository-group</id>
            <mirrorOf>central</mirrorOf>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public</url>
        </mirror>

参考文章:
https://blog.youkuaiyun.com/qiangqiang816/article/details/81541554
https://blog.youkuaiyun.com/hotdust/article/details/53047896

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值