talira

Apache Maven

Apache Maven builds, tests, and documents Java projects from a single project object model (POM)

open sourceApache-2.0self-hostablefree

Apache Maven is a build and project management tool for Java. Each project is described by a project object model (POM), and plugins build it into JARs, WARs or distributions, run its tests, publish artifacts and generate a project site, the same way for every Maven project. It resolves dependencies, including transitive ones, from a central repository, and integrates with source control for releases. Maven is a project of the Apache Software Foundation; Maven 3.9+ runs on JDK 8 or later, and Maven 4 is in release candidates.

Ways to install

Problems it solves

  • build my Java project the same way on every developer's machine without custom build scripts
  • download my Java project's libraries and their transitive dependencies automatically
  • new developers lose days learning each Java project's one-off build setup
  • package my Java app as a JAR or WAR from project metadata without scripting
  • run unit tests as a standard step of every Java build
  • publish my Java library's artifacts to a repository so other projects can depend on them
  • tag and release a Java project from source control without a manual checklist
  • generate a website for my Java project with dependency and test reports
  • compile against an older JDK than the one my build tool runs on

Features

  • project object model (POM) and standard project layout
  • transitive dependency management from a central repository
  • model-based builds into JAR, WAR or distribution outputs
  • unit tests as part of the normal build cycle
  • plugins written in Java or scripting languages
  • release management integrated with Subversion or Git
  • project site and reports generated from the POM
  • toolchains to build against other JDK versions
  • multi-project builds
  • Maven Wrapper, Maven Daemon and Maven Upgrade Tool

Limitations

  • Doesn't suit projects with unusual build layouts: Maven expects its standard project structure, and some projects must forgo features or Maven itself4

Capabilities

Has a command line toolplan not known
Takes pluginsplan not known

Alternatives

The same job

These do what Apache Maven does.

  1. Gradle The open source build system of choice for Java, Android, and Kotlin developers
  2. Bazel a fast, scalable, multi-language and extensible build system

Compare Apache Maven with the top 3