Maven (Apache Maven) is the traditional build tool and dependency manager for Java, built and maintained by the Apache Software Foundation and free/open-source. It ranks #17 among dev tools in usage surveys at roughly 16.4% share. It defines a project's dependencies, plugins, and build lifecycle (compile, test, package, install) in a structured XML file called pom.xml, and remains the default build tool in many enterprise Java shops even as Gradle has gained ground on newer projects.
Dependencies are declared in a project's pom.xml; Maven then downloads them and runs the standard build lifecycle.
<!-- pom.xml -->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>3.2.5</version>
</dependency>
</dependencies>
# clean previous build output, run tests, and package/install the jar
mvn clean install
Maven requires a JDK and installs as a standalone CLI, or comes bundled with most Java IDEs (IntelliJ IDEA, Eclipse).
# macOS via Homebrew
brew install maven
# verify install
mvn -version
# scaffold a new project from a starter archetype
mvn archetype:generate -DgroupId=com.example -DartifactId=my-app