โ˜•

Maven

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.

Quick facts
Type: Java build tool and dependency manager
Made by: Apache Software Foundation
License: Free / open-source (Apache 2.0)
Platforms/Hosting: Cross-platform, runs anywhere a JVM does
Primary use case: Managing dependencies and the compile/test/package lifecycle of Java projects
Jump to: ExampleGetting startedBest for

Example

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

Getting started

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
Best for: Java projects โ€” especially larger, enterprise, or multi-module ones โ€” that benefit from Maven's rigid, convention-over-configuration project structure and its huge ecosystem of plugins for testing, packaging, and deployment.