# Install maven with Homebrew, apk, chocolatey, apt, dnf, Nix, pacman, scoop, zypper

Java-based project management. Version 3.9.16 via Homebrew; verified 2026-05-17.

## Install

```sh
sudo av install brew:maven
```

## Agent safety answer

maven builds Java projects and can deploy artifacts to package repositories.

- **Credential access:** Reads settings.xml credentials, environment variables, and repository auth.
- **Remote mutation:** Can deploy artifacts and run plugins that call remote services.
- **Publish/artifact risk:** Can publish jars, plugins, and release metadata.
- **Recommended control:** Gate deploy, release plugins, and credentialed repository access.
- **Agent-use guidance:** Allow test/package goals; require approval for deploy, release, and secret-backed plugin goals.

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install maven
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add maven
```

  Evidence: Alpine Linux edge package indexes: maven from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install libmaven3-core-java
```

  Evidence: Debian stable package indexes: libmaven3-core-java from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install maven
```

  Evidence: Fedora Rawhide package metadata: maven from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#maven
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ma/maven/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S maven
```

  Evidence: Arch Linux sync databases: maven from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install maven
```

  Evidence: openSUSE Tumbleweed package metadata: maven from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install maven
```

  Evidence: Chocolatey community package catalog: maven from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','lunacy'

- Scoop (92%):

```sh
scoop install main/maven
```

  Evidence: Scoop official bucket manifest trees: bucket/maven.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:maven
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/maven>
- **Version:** 3.9.16
- **Source summary:** Java-based project management
- **Homepage:** <https://maven.apache.org/>
- **Repository:** <https://gitbox.apache.org/repos/asf/maven.git>
- **Upstream docs:** <https://maven.apache.org/guides>
- **License:** Apache-2.0
- **Source archive:** <https://www.apache.org/dyn/closer.lua?path=maven/maven-3/3.9.16/binaries/apache-maven-3.9.16-bin.tar.gz>
- **Last updated:** 2026-05-17T19:11:46Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- mvn (cli)
- mvnDebug (cli)
- mvnyjp (cli)
- mvn (alias)
- mvnDebug (alias)
- mvnyjp (alias)

## Dependencies

- openjdk

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.9.16
- Package-manager updated: 2026-05-17
- Local data: ok
- Upstream repository: https://maven.apache.org/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Apache Maven is the Apache Software Foundation's long-running Java build and project-management tool, centered on a project object model, dependency coordinates, plugins, and repository metadata.

### Project history

Maven's official site describes it as a build tool for Java projects that uses a Project Object Model to manage compilation, testing, and documentation. The Apache Maven source page also shows that the project is not a single repository in practice: full Maven sources span Maven core, plugins, components, skins, and related repositories, with a manifest repository used to check out the whole source tree.

The release history documents Maven 3 as the maintained general-availability line and Maven 4 as a long-running alpha, beta, and release-candidate effort. That makes Maven unusual among CLI build tools: the user-facing command is compact, but the surrounding ecosystem of plugins, resolver components, repository layout, and site tooling is large and separately versioned.

### Adoption history

Maven became a default packaging and dependency idiom for Java because its repository model is shared beyond Maven itself. Apache's Maven Central documentation explicitly addresses both projects that use Maven for builds and projects that only want their releases added to the central repository.

Homebrew, Debian-family, RPM-family, Chocolatey, Scoop, Nix, Pacman, and other package-manager entries in the input show Maven's broad CLI distribution footprint outside Java IDEs.

### How it is used

Typical CLI use is `mvn` in a project containing a `pom.xml`, with per-user settings in `~/.m2/settings.xml` and project-local runner options in `.mvn/maven.config`, `.mvn/jvm.config`, and `.mvn/extensions.xml`. Credentials for remote repositories and mirrors live in the Maven settings model's `servers` entries, with encrypted-password support via `settings-security.xml`.

### Why package nerds care

Maven matters to package nerds because it standardized much of the vocabulary of Java artifact packaging: groupId, artifactId, version, POM metadata, transitive dependency resolution, local caches, and central remote repositories. Even tools that compete with Maven frequently consume Maven repositories and Maven metadata.

### Timeline

- 2002: Apache Maven site copyright history begins.
- 2010: Maven 3 line begins and later becomes the long-lived GA family.
- 2023: Maven 4 alpha releases appear in the official release history.
- 2024: Maven 4 beta and release-candidate series begins.
- 2026: Maven 3.9.x remains a maintained GA release line while Maven 4 release candidates continue.

### Related projects

- Maven Central, Maven Resolver, Maven plugins, Maven Wrapper, Maven Daemon, Gradle, Apache Ant, Apache Ivy

### Sources

- <https://maven.apache.org/>
- <https://maven.apache.org/configure.html>
- <https://maven.apache.org/docs/history.html>
- <https://maven.apache.org/guides/mini/guide-encryption.html>
- <https://maven.apache.org/ref/3.9.16/maven-settings/settings.html>
- <https://maven.apache.org/repository/index.html>
- <https://maven.apache.org/scm.html>
- source_facts.package-manager-url


## Security Notes

build system capable of executing project logic.

- **Geiger risk:** yellow / high
- build system capable of executing project logic


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.m2/settings.xml

## Credential files

- Unix: ~/.m2/settings.xml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** maven
- **Aliases:** mvn
- **Version Scheme:** 0
- **Revision:** 0
- **Conflicts With:** mvnvm
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - libmaven3-core-java - 3.9.9-1: normalized package name match | Debian stable package indexes: libmaven3-core-java from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Core libraries for Maven 3 | http://maven.apache.org
- Debian apt - maven - 3.9.9-1: normalized package name match | Debian stable package indexes: maven from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Java software project management and comprehension tool | http://maven.apache.org
- Nix - maven: normalized package name match | nixpkgs package indexes: pkgs/by-name/ma/maven/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libmaven3-core-java - 3.8.7-2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmaven3-core-java from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Core libraries for Maven 3 | http://maven.apache.org
- Ubuntu apt - maven - 3.8.7-2: normalized package name match | Ubuntu 24.04 LTS package indexes: maven from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Java software project management and comprehension tool | http://maven.apache.org
- apk - maven - 3.9.16-r0: normalized package name match | Alpine Linux edge package indexes: maven from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Java project management and project comprehension tool | https://maven.apache.org/
- dnf - maven - 3.9.11-13.fc45: normalized package name match | Fedora Rawhide package metadata: maven from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Java project management and project comprehension tool | https://maven.apache.org/
- dnf - maven-lib - 3.9.11-13.fc45: normalized package name match | Fedora Rawhide package metadata: maven-lib from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Core part of Maven | https://maven.apache.org/
- dnf - maven-openjdk25 - 3.9.11-13.fc45: normalized package name match | Fedora Rawhide package metadata: maven-openjdk25 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | maven binding for openjdk25 | https://maven.apache.org/
- dnf - maven-unbound - 3.9.11-13.fc45: normalized package name match | Fedora Rawhide package metadata: maven-unbound from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | maven binding for unbound | https://maven.apache.org/
- pacman - maven - 3.9.16-1: normalized package name match | Arch Linux sync databases: maven from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Java project management and project comprehension tool | https://maven.apache.org
- zypper - maven - 3.9.16-1.1: normalized package name match | openSUSE Tumbleweed package metadata: maven from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Java project management and project comprehension tool | https://maven.apache.org/
- zypper - maven-javadoc - 3.9.16-1.1: normalized package name match | openSUSE Tumbleweed package metadata: maven-javadoc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | API documentation for maven | https://maven.apache.org/
- zypper - maven-lib - 3.9.16-1.1: normalized package name match | openSUSE Tumbleweed package metadata: maven-lib from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Core part of Maven | https://maven.apache.org/
- Chocolatey - maven: normalized package name match | Chocolatey community package catalog: maven from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','lunacy'
- Scoop - main/maven: normalized package name match | Scoop official bucket manifest trees: bucket/maven.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [openjdk](https://www.automicvault.com/pkg/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [helidon](https://www.automicvault.com/pkg/brew/helidon/) - Popular package that depends on this formula.
- [maven-shell](https://www.automicvault.com/pkg/brew/maven-shell/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools, java.
- [ant](https://www.automicvault.com/pkg/brew/ant/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools, java.
- [gradle](https://www.automicvault.com/pkg/brew/gradle/) - Shares av.db curated category or tags: build-tools, cli, dependency-management, developer-tools, java.
- [ivy](https://www.automicvault.com/pkg/brew/ivy/) - Shares av.db curated category or tags: build-tools, cli, dependency-management, developer-tools, java.
- [leiningen](https://www.automicvault.com/pkg/brew/leiningen/) - Shares av.db curated category or tags: build-tool, build-tools, cli, dependency-management, developer-tools.
- [mill](https://www.automicvault.com/pkg/brew/mill/) - Shares av.db curated category or tags: build-tool, build-tools, cli, developer-tools, java.
- [sbt](https://www.automicvault.com/pkg/brew/sbt/) - Shares av.db curated category or tags: build-tool, build-tools, cli, dependency-management, developer-tools.
- [bnd](https://www.automicvault.com/pkg/brew/bnd/) - Shares av.db curated category or tags: cli, developer-tools, java.

## Combined YAML source

View the package source record on GitHub. [combined/maven.yml](https://github.com/automic-vault/db/blob/main/combined/maven.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
