Maven中央仓库地址大全,Maven中央仓库配置示例

                                  《 Maven 中央仓库地址大全 》

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

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

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

 

Maven 中央仓库地址大全

1、阿里中央仓库(首推1)

 
  1. <repository>  

  2.     <id>alimaven</id>

  3.     <name>aliyun maven</name>

  4.     <url>http://maven.aliyun.com/nexus/content/groups/public/</url>

  5. </repository> 

 

2、camunda.com 中央仓库(首推2)

 
  1. <repository>  

  2.     <id>activiti-repos2</id>  

  3.     <name>Activiti Repository 2</name>  

  4.     <url>https://app.camunda.com/nexus/content/groups/public</url>  

  5. </repository>  

 

3、spring.io 中央仓库

 
  1. <repository>  

  2.     <id>springsource-repos</id>  

  3.     <name>SpringSource Repository</name>  

  4.     <url>http://repo.spring.io/release/</url>  

  5. </repository>

 

4、maven.apache.org 中央仓库

 
  1. <repository>  

  2.     <id>central-repos</id>  

  3.     <name>Central Repository</name>  

  4.     <url>http://repo.maven.apache.org/maven2</url>  

  5. </repository>


5、maven.org 中央仓库

 
  1. <repository>  

  2.     <id>central-repos1</id>  

  3.     <name>Central Repository 2</name>  

  4.     <url>http://repo1.maven.org/maven2/</url>  

  5. </repository>

 

6、alfresco.com 中央仓库(首推3)

 
  1. <repository>  

  2.     <id>activiti-repos</id>  

  3.     <name>Activiti Repository</name>  

  4.     <url>https://maven.alfresco.com/nexus/content/groups/public</url>  

  5. </repository>  


7、oschina 中央仓库(需要x墙哟)

 
  1. <repository>  

  2.     <id>oschina-repos</id>  

  3.     <name>Oschina Releases</name>  

  4.     <url>http://maven.oschina.net/content/groups/public</url>  

  5. </repository>  

 

8、oschina thinkgem 中央仓库(需要x墙哟)

 
  1. <repository>   

  2.     <id>thinkgem-repos</id>   

  3.     <name>ThinkGem Repository</name>  

  4.     <url>http://git.oschina.net/thinkgem/repos/raw/master</url>  

  5. </repository> 

 

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

 
  1. <repository>  

  2.     <id>java-repos</id>  

  3.     <name>Java Repository</name>  

  4.     <url>http://download.java.net/maven/2/</url>  

  5. </repository>

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

 
  1. <repository>   

  2.     <id>thinkgem-repos2</id>   

  3.     <name>ThinkGem Repository 2</name>  

  4.     <url>https://raw.github.com/thinkgem/repository/master</url>  

  5. </repository>  

 


Maven 中央仓库配置示例

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

 
  1. <profile>

  2. <id>jdk‐1.8</id>

  3. <activation>

  4. <activeByDefault>true</activeByDefault>

  5. <jdk>1.8</jdk>

  6. </activation>

  7. <properties>

  8. <maven.compiler.source>1.8</maven.compiler.source>

  9. <maven.compiler.target>1.8</maven.compiler.target>

  10. <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>

  11. </properties>

  12. <!-- dubbo 官方的解决方案 -->

  13. <repositories>

  14. <repository>

  15. <id>sonatype-nexus-snapshots</id>

  16. <url>https://oss.sonatype.org/content/repositories/snapshots</url>

  17. <releases>

  18. <enabled>false</enabled>

  19. </releases>

  20. <snapshots>

  21. <enabled>true</enabled>

  22. </snapshots>

  23. </repository>

  24. </repositories>

  25. </profile>

如下图:

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值