Maven中央仓库地址配置大全
转载自:
https://www.jb51.net/article/189796.htm
在上一篇文章中完成了 《Maven镜像地址大全 》,后来又花了时间又去收集并整理了关于 maven 远程仓库地址,并整理于此,关于 Maven 远程仓库地址的配置方式有两种,
第一种:直接在项目的 pom.xml 文件中进行修改(不推荐,尤其是在多人协助的开发过程中非常的费事费力);
第二种:将 Maven 的远程仓库统一的配置到 Maven 的 Settings.xml 的配置文件中;
Maven 中央仓库地址大全
1、阿里中央仓库(首推1)
1
2
3
4
5
|
< repository > < id >alimaven</ id > < name >aliyun maven</ name > </ repository > |
2、camunda.com 中央仓库(首推2)
1
2
3
4
5
|
< repository > < id >activiti-repos2</ id > < name >Activiti Repository 2</ name > </ repository > |
3、spring.io 中央仓库
1
2
3
4
5
|
< repository > < id >springsource-repos</ id > < name >SpringSource Repository</ name > </ repository > |
4、maven.apache.org 中央仓库
1
2
3
4
5
|
< repository > < id >central-repos</ id > < name >Central Repository</ name > </ repository > |
5、maven.org 中央仓库
1
2
3
4
5
|
< repository > < id >central-repos1</ id > < name >Central Repository 2</ name > </ repository > |
6、alfresco.com 中央仓库(首推3)
1
2
3
4
5
|
< repository > < id >activiti-repos</ id > < name >Activiti Repository</ name > </ repository > |
7、oschina 中央仓库(需要x墙哟)
1
2
3
4
5
|
< repository > < id >oschina-repos</ id > < name >Oschina Releases</ name > </ repository > |
8、oschina thinkgem 中央仓库(需要x墙哟)
1
2
3
4
5
|
< repository > < id >thinkgem-repos</ id > < name >ThinkGem Repository</ name > </ repository > |
9、java.net 中央仓库(需要x墙哟)
1
2
3
4
5
|
< repository > < id >java-repos</ id > < name >Java Repository</ name > </ repository > |
10、github.com 中央仓库(需要x墙哟)
1
2
3
4
5
|
< repository > < id >thinkgem-repos2</ id > < name >ThinkGem Repository 2</ name > </ repository > |
Maven 中央仓库配置示例
这里使用 Dubbo官方的中央仓库为示例,在 settings.xml 的 profiles 节点中添加如下内容:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
< 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 > < releases > < enabled >false</ enabled > </ releases > < snapshots > < enabled >true</ enabled > </ snapshots > </ repository > </ repositories > </ profile > |
如下图:
注意:这儿的jdk-1.8表示,在开发环境中使用jdk-1.8时,则激活该环境;
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)