# Maven Central

**Maven Central**（亦称“中央仓库”）是Java及其他JVM语言构建产物的主要公共仓库，由Sonatype公司托管和运营。[Apache Maven](https://www.edgepedia.org/zh/apache-maven)、Gradle、Ivy等构建工具默认从该仓库下载库文件，并通过组、构件和版本（GAV）坐标解析项目对象模型（POM）文件中声明的依赖。<sup>[1](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)</sup><sup> • </sup><sup>[2](https://maven.apache.org/guides/introduction/introduction-to-repositories)</sup>

| 关键事实 | 详情 |
|---|---|
| 角色 | Apache Maven的默认远程仓库，也是Gradle及其他JVM构建工具的标准来源<sup>[2](https://maven.apache.org/guides/introduction/introduction-to-repositories)</sup><sup> • </sup><sup>[1](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)</sup> |
| 命名 | 2005年正式定名为Maven Central<sup>[1](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)</sup> |
| 管理者 | Sonatype由Jason Van Zyl和Brian Fox于2008年创立，已托管Central近二十年<sup>[1](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)</sup><sup> • </sup><sup>[3](https://www.maven.org/)</sup> |
| 规模 | 超过五十万个项目、一千二百多万个项目版本；2023年估计处理一万亿次请求<sup>[1](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)</sup> |
| 增长 | 2024年前7个月请求了8280亿个Java组件；2025年下载量同比增长19.42%<sup>[4](https://www.sonatype.com/hubfs/SSCR-2024/SSCR_2024-FINAL-10-10-24.pdf)</sup><sup> • </sup><sup>[5](https://www.sonatype.com/hubfs/1-2025_Website-Assets/SSCR_2025/SSCR_2026_final.pdf)</sup> |
| 不可变性 | 已发布的版本不可更改或替换；只能添加新版本<sup>[6](https://maven.apache.org/repository/guide-central-repository-upload)</sup> |
| 可持续性措施 | 自2026年6月16日起实施发布软限制，自2026年10月1日起实施速率限制，针对发布量和消费量最高的用户<sup>[7](https://central.sonatype.org/publish/maven-central-publishing-limits)</sup><sup> • </sup><sup>[8](https://central.sonatype.org/faq/429-error/)</sup> |

## 起源

Apache Maven始于2000年代初，最初是[Apache软件基金会](https://www.edgepedia.org/zh/apache-software-foundation)Jakarta项目下Apache Turbine的子项目，于2004年7月达到1.0版本。Maven是最早推行二进制可复用性、约定优于配置以及通过POM文件进行声明式依赖管理的系统之一。POM文件是描述项目结构、依赖和元数据的XML文件。在Maven之前，大多数Java工程师使用Apache Ant，并将每个库（包括所有传递依赖）连同源代码一起存储在版本控制系统中。Maven则从远程仓库以自定义格式下载构件，使消费者能够自动获取传递依赖。<sup>[1](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)</sup>

第一个Maven仓库如今被称为Maven Central，是一个社区主导的仓库，任何人都可以发布构件。2005年，它被正式命名为Maven Central，作为分发开源二进制文件及其元数据的中心枢纽。其托管位置几经迁移：最初位于Apache软件基金会，后迁至Ibiblio，但后者的基础设施在需求压力下不堪重负。随后Jason Van Zyl购买了一台托管在Contegix的服务器，Contegix创始人Matthew Porter提供了折扣带宽。那台机器从2007年3月到2011年3月全天候为Maven Central提供服务；在此期间，构件被1430万个独立IP地址请求超过120亿次，截至2009年1月，仓库容量为60 GB。<sup>[1](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)</sup><sup> • </sup><sup>[9](https://www.sonatype.com/blog/2011/07/central-grows-up-see-the-history)</sup>

Sonatype由Van Zyl和Brian Fox于2008年创立，最终在Fox和一个专职运营团队的主持下接管了Maven Central的日常管理。里程碑事件包括2010年部署欧洲镜像、2014年启用SSL连接、2018年支持HTTP/2，以及2020年全面迁移至HTTPS。<sup>[1](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)</sup>

## 运作方式

Maven区分两种仓库类型：本地仓库，即开发者机器上缓存下载内容的目录；以及通过`https://`等协议访问的远程仓库。当项目声明了一个本地不存在的依赖时，Maven会默认从repo.maven.apache.org的中央仓库下载它。若干官方Central仓库在地理上分布部署，各组织通常出于安全、速度和带宽方面的考虑运行内部镜像或仓库管理器。<sup>[2](https://maven.apache.org/guides/introduction/introduction-to-repositories)</sup>

构件通过GAV坐标寻址：以反向域名开头的`groupId`、一个`artifactId`和一个`version`。仓库布局将这些坐标转换为文件路径，将组ID中的点替换为斜杠；自2002年Maven诞生以来，该布局仅在Maven 2发布时变更过一次。<sup>[10](https://central.sonatype.org/publish/requirements/)</sup><sup> • </sup><sup>[11](https://maven.apache.org/repositories/layout.html)</sup>

## 发布要求

向Maven Central发布需满足若干要求，旨在保证最低限度的元数据质量和完整性：<sup>[6](https://maven.apache.org/repository/guide-central-repository-upload)</sup>

- 只能上传发布版本；一个发布版本只能依赖于已发布的文件，且仓库在发布后不会更改或替换该版本。<sup>[6](https://maven.apache.org/repository/guide-central-repository-upload)</sup>
- 打包类型不是`pom`的项目必须随主构件一起提供源码和Javadoc JAR。<sup>[10](https://central.sonatype.org/publish/requirements/)</sup>
- 所有部署的文件需要有效的校验和文件，其中`.md5`和`.sha1`为必需，`.sha256`和`.sha512`为支持项，且每个文件必须附有GPG/PGP签名的`.asc`签名文件。<sup>[10](https://central.sonatype.org/publish/requirements/)</sup>
- POM必须包含必需的元数据：正确的坐标、项目名称、描述和URL、许可证信息、开发者信息以及源代码控制信息。<sup>[10](https://central.sonatype.org/publish/requirements/)</sup>
- 发布者必须注册并验证命名空间，通过DNS TXT记录证明域名所有权；对于`io.github.<username>`等代码托管域名，则通过验证仓库来证明。<sup>[12](https://central.sonatype.org/register/namespace/)</sup>

目前发布通过Central Publisher Portal进行，其中包括一个Maven插件，用于打包构件、生成校验和并在发布前上传以供验证。<sup>[13](https://central.sonatype.org/publish/publish-portal-maven/)</sup>

## 规模与生态系统角色

Maven Central支撑着企业级Java开发，其规模意味着微小的变化也会广泛传播。它容纳了超过五十万个项目、一千二百多万个项目版本，2023年处理了估计一万亿次请求，当时报告的项目同比增长28%，下载量同比增长25%。<sup>[1](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)</sup> 2024年前七个月，共请求了8280亿个Java组件，Sonatype估计到2024年底该生态系统将处理远超4.4万亿次请求，超过2023年所有四个受监测生态系统的总和。<sup>[4](https://www.sonatype.com/hubfs/SSCR-2024/SSCR_2024-FINAL-10-10-24.pdf)</sup> 2025年下载量同比增长19.42%，略有放缓，归因于针对用量最高的用户实施限制的可持续性措施。<sup>[5](https://www.sonatype.com/hubfs/1-2025_Website-Assets/SSCR_2025/SSCR_2026_final.pdf)</sup>

尽管最初是为Java库而设计，Central从2012年初开始扩展到Scala等其他JVM语言，Maven的元数据格式成为后来包括Gradle和Ivy在内的构建工具所采用的事实标准。截至2022年底，Maven Central拥有492,000个Java开源项目。<sup>[1](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)</sup><sup> • </sup><sup>[21](https://www.sonatype.com/resources/state-of-the-software-supply-chain-2022/open-source-supply-demand-security)</sup> 在JFrog于2021年2月宣布JCenter仓库将停止服务后，Gradle文档推荐使用`mavenCentral()`、`google()`或私有仓库作为替代方案，许多Android和Java项目将其依赖迁移到了Central。<sup>[14](https://docs.gradle.org/current/userguide/upgrading_version_6.html)</sup>

对该仓库依赖网络的研究表明，它由相对少数被众多其他组件依赖的组件所主导。<sup>[15](https://arxiv.org/abs/2502.02879)</sup> 由于构件具有不可变性，Central积累每个已发布库的每个版本；一项对代表73,653个库的1,487,956个构件的研究发现，超过30%的库有多个版本被最新构件使用，而对于热门库，超过50%的版本仍在使用中。<sup>[16](https://arxiv.org/abs/1903.05394)</sup>

## 安全与可持续性

仓库的规模塑造了其安全格局。在约400万个Maven Central发布版本的子样本中，仅约1%存在直接漏洞，但约46.8%受到传递漏洞的影响，即依赖图中间接依赖的组件所含的漏洞；漏洞在依赖网络中迅速传播，而被大量依赖的构件未必漏洞更少。<sup>[17](https://arxiv.org/abs/2504.04175)</sup>

消费和发布如今正被纳入限制。Maven Central已开始对异常高流量的消费实施限制，返回`429 Too Many Requests`响应，执行初期聚焦于流量排名最高的百分之几的访问模式，预计阈值将随时间推移逐步下调。<sup>[8](https://central.sonatype.org/faq/429-error/)</sup> 在发布方面，2026年6月16日开始的软限制阶段通过Usage Center引入用量可见性和通知，速率限制则于2026年10月1日开始。限制按组织基于三项月度指标评估：文件数、发布大小和发布数量，以滚动三个月平均值进行比较。大多数社区开源项目预计不受影响，Maven Central对普通社区开源发布仍然免费；商业性质的构件自2026年10月1日起无论数量多少均需使用付费的Publisher Pro选项。<sup>[7](https://central.sonatype.org/publish/maven-central-publishing-limits)</sup>

这些变化反映了公共注册中心普遍面临的压力：包括Maven Central、PyPI、crates.io、RubyGems、npm和NuGet在内的注册中心每年服务数万亿次下载，且总量以每年30%至50%的速度增长，开源安全基金会认为，注册中心需要可持续的经常性资金，才能提供企业所需的规模、可用性和安全性。<sup>[18](https://www.itpro.com/software/open-source/firms-pledge-increased-financial-support-for-public-package-registries)</sup>

## 搜索与状态

旧版搜索界面search.maven.org于2023年2月23日开始将浏览器用户重定向至central.sonatype.com；新门户于2022年9月上线，提供包括安全漏洞和软件质量信息在内的组件详情，搜索索引通常在发布后几分钟内更新。search.maven.org的API预计将在网页界面停用后继续运作。<sup>[19](https://central.sonatype.org/faq/what-happened-to-search-maven-org/)</sup> 服务健康状况发布在状态页面上；在最近的90天窗口内，repo1.maven.org的主CDN记录了99.83%的正常运行时间，central.sonatype.com门户为100%。<sup>[20](https://status.maven.org/)</sup>

## References

1. [The Evolution of Maven Central: From Origin to Modernization, Sonatype Blog](https://www.sonatype.com/blog/the-history-of-maven-central-and-sonatype-a-journey-from-past-to-present?hs_amp=true)
2. [Introduction to Repositories, Apache Maven](https://maven.apache.org/guides/introduction/introduction-to-repositories)
3. [Maven Central (Central Portal home), Sonatype](https://www.maven.org/)
4. [Scale of Open Source, Sonatype State of the Software Supply Chain 2024 (PDF)](https://www.sonatype.com/hubfs/SSCR-2024/SSCR_2024-FINAL-10-10-24.pdf)
5. [Registry Consumption, Sonatype State of the Software Supply Chain 2026 (PDF)](https://www.sonatype.com/hubfs/1-2025_Website-Assets/SSCR_2025/SSCR_2026_final.pdf)
6. [Guide to uploading artifacts to the Central Repository, Apache Maven](https://maven.apache.org/repository/guide-central-repository-upload)
7. [Maven Central Publishing Limits, Central Repository Documentation](https://central.sonatype.org/publish/maven-central-publishing-limits)
8. [429 Too Many Requests and Maven Central consumption limits, Central Repository Documentation](https://central.sonatype.org/faq/429-error/)
9. [Maven Central Grows Up: See the History, Sonatype Blog (Brian Fox, 2011)](https://www.sonatype.com/blog/2011/07/central-grows-up-see-the-history)
10. [Requirements, Central Repository Documentation](https://central.sonatype.org/publish/requirements/)
11. [Maven Repository Layout, Apache Maven](https://maven.apache.org/repositories/layout.html)
12. [Register a Namespace, Central Repository Documentation](https://central.sonatype.org/register/namespace/)
13. [Publishing by Using the Maven Plugin, Central Repository Documentation](https://central.sonatype.org/publish/publish-portal-maven/)
14. [Upgrading from Gradle 6.x to 7.0, Gradle User Manual](https://docs.gradle.org/current/userguide/upgrading_version_6.html)
15. [Popularity and Innovation in Maven Central, arXiv:2502.02879](https://arxiv.org/abs/2502.02879)
16. [The Emergence of Software Diversity in Maven Central, arXiv:1903.05394](https://arxiv.org/abs/1903.05394)
17. [The Ripple Effect of Vulnerabilities in Maven Central, arXiv:2504.04175](https://arxiv.org/abs/2504.04175)
18. [Firms pledge increased financial support for public package registries, ITPro](https://www.itpro.com/software/open-source/firms-pledge-increased-financial-support-for-public-package-registries)
19. [What Happened To search.maven.org?, Central Repository Documentation](https://central.sonatype.org/faq/what-happened-to-search-maven-org/)
20. [Maven Central Status](https://status.maven.org/)
21. [Open Source Dependency Management: Trends and Recommendations](https://www.sonatype.com/resources/state-of-the-software-supply-chain-2022/open-source-supply-demand-security)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Development tools and collaboration infrastructure › Build, deployment, and development tooling › Package registries and repositories

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/maven-central

English original: https://www.edgepedia.org/maven-central
