Apache Maven
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. The reference material consulted while preparing these pages is listed in the section bibliography. |
Apache Maven is a build, dependency management and project information tool.
A project describes itself in a Project Object Model (pom.xml): its coordinates (groupId, artifactId, version), its
dependencies, and the plugins that act on it. Maven applies conventions (sources in src/main/java, tests in src/test/java,
output in target) and a fixed build lifecycle made of phases such as compile, test, package and deploy; plugins attach
goals to those phases. Because the layout and the lifecycle are the same everywhere, a developer who knows one Maven project can
build another.
Maven is not a general scripting tool. Behaviour that does not fit the lifecycle is added by configuring or writing a plugin rather than by writing build logic in the POM, and the project’s own documentation states what Maven is and is not on its What is Maven? page. The trade is the opposite of Ant’s: less freedom in exchange for a build that is short, declarative and familiar. The comparison with Ant and Gradle is on Comparing Ant, Maven & Gradle.
Release baseline
The pages in this subsection are written against these releases, checked on 2026-10-16, and every example marked as run was executed on JDK 26:
| Release | Status | Notes |
|---|---|---|
Maven 3.10.0 |
Current stable (27 September 2026) |
Needs Java 8 or later to run. |
Maven 3.9.16 |
Previous stable minor (13 May 2026) |
Still maintained. Where it differs from 3.10, the page says so. |
Maven 4.0.0-rc-7 |
Release candidate (September 2026) |
Not a final release. It needs Java 17 or later to run and is covered in its own group of pages. |
Maven’s support policy is that the last version of the last two series is supported, which today means 3.10.0 and 3.9.16 (see the release history). The full table, the end-of-life lines and an upgrade checklist from 3.9 to 3.10 are on Maven: Versions & Release History.
Recommended reading path
-
Build Automation Fundamentals for the vocabulary shared by all three tools.
-
Maven: Philosophy, Coordinates & Directory Layout, Maven: Installation and Maven: Getting Started for a first project.
-
Running Maven (CLI), Maven: POM Fundamentals, Maven: Build Lifecycle and Maven: Plugins & Their Configuration for the core model.
-
Maven: Dependencies, Scopes & Mediation and Maven: Dependency Management & BOMs for libraries.
-
Maven: Multi-Module Builds & the Reactor, Maven: Testing with Surefire and Maven: Packaging JARs, WARs & Manifests for real projects.
-
Maven: Install, Deploy & Distribution Management and Maven: Publishing to Maven Central to ship a library.
-
Maven 4: What’s New and Migrating to Maven 4 to see what the release candidate changes.