Maven中央仓库地址配置大全

所属分类: 软件编程 / java 阅读数: 87
收藏 0 赞 0 分享

在上一篇文章中完成了 《Maven镜像地址大全 》,后来又花了时间又去收集并整理了关于 maven 远程仓库地址,并整理于此,关于 Maven 远程仓库地址的配置方式有两种,

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

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

Maven 中央仓库地址大全

1、阿里中央仓库(首推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> 

9、java.net 中央仓库(需要x墙哟)

<repository> 
  <id>java-repos</id> 
  <name>Java Repository</name> 
  <url>http://download.java.net/maven/2/</url> 
</repository>

10、github.com 中央仓库(需要x墙哟)

<repository>  
  <id>thinkgem-repos2</id>  
  <name>ThinkGem Repository 2</name> 
  <url>https://raw.github.com/thinkgem/repository/master</url> 
</repository> 

Maven 中央仓库配置示例

这里使用 Dubbo官方的中央仓库为示例,在 settings.xml 的 profiles 节点中添加如下内容:

<profile>
 <id>jdk‐1.8</id>
 <activation>
 <activeByDefault>true</activeByDefault> 
 <jdk>1.8</jdk>
 </activation>
 <properties>
 <maven.compiler.source>1.8</maven.compiler.source>
 <maven.compiler.target>1.8</maven.compiler.target>
 <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
 </properties>
 <!-- dubbo 官方的解决方案 -->
 <repositories>
 <repository>
  <id>sonatype-nexus-snapshots</id>
  <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  <releases>
  <enabled>false</enabled>
  </releases>
  <snapshots>
  <enabled>true</enabled>
  </snapshots>
 </repository>
 </repositories>
</profile>

如下图:

 

注意:这儿的jdk-1.8表示,在开发环境中使用jdk-1.8时,则激活该环境;

更多精彩内容其他人还在看

JavaWeb项目部署到服务器详细步骤详解

这篇文章主要介绍了JavaWeb项目如何部署到服务器,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

IDEA基于支付宝小程序搭建springboot项目的详细步骤

这篇文章主要介绍了IDEA基于支付宝小程序搭建springboot项目的详细步骤,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

详解SpringBoot应用服务启动与安全终止

这篇文章主要介绍了SpringBoot应用服务启动与安全终止,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

Spring Boot启动及退出加载项的方法

这篇文章主要介绍了Spring Boot启动及退出加载项的方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

Spring Data Jpa 自动生成表结构的方法示例

这篇文章主要介绍了Spring Data Jpa 自动生成表结构的方法示例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

IDEA中osgi的开发应用指南详解

这篇文章主要介绍了IDEA中osgi的开发应用指南详解,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

详解用maven将dubbo工程打成jar包运行

这篇文章主要介绍了详解用maven将dubbo工程打成jar包运行,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

详解Java合并数组的两种实现方式

这篇文章主要介绍了Java合并数组的两种实现方式,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
收藏 0 赞 0 分享

使用Jenkins Pipeline自动化构建发布Java项目的方法

这篇文章主要介绍了使用Jenkins Pipeline自动化构建发布Java项目的方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享

使用Maven配置Spring的方法步骤

这篇文章主要介绍了使用Maven配置Spring的方法步骤,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
收藏 0 赞 0 分享
查看更多