Maven中央仓库地址大全

文章介绍了Maven远程仓库的两种配置方式,推荐在Settings.xml中统一配置。列举了多个中央仓库,包括阿里云、camunda.com、spring.io、maven.apache.org等,并特别推荐阿里云仓库以解决国内访问慢的问题。同时提供了阿里云仓库在settings.xml中的具体配置方法。

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

一、仓库地址配置方式

关于 Maven 远程仓库地址的配置方式有两种:

第1种:直接在项目的 pom.xml 文件中进行修改(不推荐,尤其是在多人协助的开发过程中非常的费事费力);

第2种:将 Maven 的远程仓库统一的配置到 Maven 的 Settings.xml 的配置文件中。

二、仓库地址大全

1、阿里中央仓库(首选推荐)
<repository> 
    <id>alimaven</id>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
2、camunda.com 中央仓库(第2推荐使用)
<repository> 
    <id>activiti-repos2</id> 
    <name>Activiti Repository 2</name> 
    <url>https://app.camunda.com/nexus/content/groups/public</url> 
</repository> 
3、spring.io 中央仓库
<repository> 
    <id>springsource-repos</id> 
    <name>SpringSource Repository</name> 
    <url>http://repo.spring.io/release/</url> 
</repository>
4、maven.apache.org 中央仓库
<repository> 
    <id>central-repos</id> 
    <name>Central Repository</name> 
    <url>http://repo.maven.apache.org/maven2</url> 
</repository>
5、maven.org 中央仓库
<repository> 
    <id>central-repos1</id> 
    <name>Central Repository 2</name> 
    <url>http://repo1.maven.org/maven2/</url> 
</repository>
6、alfresco.com 中央仓库(第3推荐使用)
<repository> 
    <id>activiti-repos</id> 
    <name>Activiti Repository</name> 
    <url>https://maven.alfresco.com/nexus/content/groups/public</url> 
</repository> 
7、oschina 中央仓库(需要x墙哟)
<repository> 
    <id>oschina-repos</id> 
    <name>Oschina Releases</name> 
    <url>http://maven.oschina.net/content/groups/public</url> 
</repository> 
8、oschina thinkgem 中央仓库(需要x墙哟)
<repository>  
    <id>thinkgem-repos</id>  
    <name>ThinkGem Repository</name> 
    <url>http://git.oschina.net/thinkgem/repos/raw/master</url> 
</repository>

三、Maven 阿里云(Aliyun)仓库

Maven 仓库默认在国外, 国内使用难免很慢,我们可以更换为阿里云的仓库。

修改 maven 根目录下的 conf 文件夹中的 settings.xml 文件,在 mirrors 节点上,添加内容如下:

<mirror>
 
  <id>aliyunmaven</id>
 
  <mirrorOf>*</mirrorOf>
 
  <name>阿里云公共仓库</name>
 
  <url>https://maven.aliyun.com/repository/public</url>
 
</mirror>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值