Alternatively, I recommend installing Homebrew for these kinds of utilities.

Then you just install Maven using:

Copybrew install maven

PS: If you got a 404 error, try doing a brew update just before

Answer from brasskazoo on Stack Overflow
🌐
Apache Maven
maven.apache.org › install.html
Installation – Maven
2 days ago - Apache Maven 3.9.16 (2bdd9fddda4b155ebf8000e807eb73fd829a51d5) Maven home: /opt/apache-maven-3.9.16 Java version: 1.8.0_45, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.8.5", arch: "x86_64", family: "mac" That’s it! Maven is now installed.
Top answer
1 of 16
2147

Alternatively, I recommend installing Homebrew for these kinds of utilities.

Then you just install Maven using:

Copybrew install maven

PS: If you got a 404 error, try doing a brew update just before

2 of 16
252

Disclaimer: Here is a complete answer taking the last version of OS X (10.9 AKA Mavericks) into account. I am aware that everything I compiled in this answer is already present in the page, but having it clearly in one answer makes it a lot clearer.

First of all, with previous versions of OS X, Maven is installed by default. If Java is missing running you@host:~ $ java in a terminal will prompt you for the Java installation.

With Mac OS X 10.9 (Mavericks), Maven is not installed by default anymore. Different options are then possible:

  • Using Homebrew:
    • you@host:~$ brew install maven will install latest Maven (3.5.2 on 02/01/2018)
    • you@host:~$ brew install maven30 will install Maven 3.0 if needed
  • Using Macports: (I did not test this)
    • you@host:~$ sudo port install maven will install latest Maven (?)
    • or:
    • you@host:~$ sudo port install maven3 will Install Maven 3.0
    • you@host:~$ sudo port select --set maven maven3 selects that version of Maven
  • Installing by hand:
    • Download Maven from its homepage
    • Follow the installation instructions:
      1. Extract the distribution archive, i.e.apache-maven-3.3.9-bin.tar.gz to the directory you wish to install Maven 3.3.9. The subdirectory apache-maven-3.3.9 will be created from the archive.
      2. Optional: Add the MAVEN_OPTS environment variable to specify JVM properties, e.g. export MAVEN_OPTS="-Xms256m -Xmx512m". This environment variable can be used to supply extra options to Maven.
      3. Make sure that JAVA_HOME is set to the location of your JDK, e.g. export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) and that $JAVA_HOME/bin is in your PATH environment variable (although that might not be necessary with the latest Mac OS X versions and the Oracle JDK).
      4. Add extracted apache-maven-3.3.9/bin to your $PATH
      5. Run mvn --version to verify that it is correctly installed.
Discussions

Changing the JDK used by the maven (mvn) formula
Hello everyone, I installed maven via brew install maven quite a while ago. But just recently I saw that my build processes were different on Windows in Mac using maven. After further investigation... More on github.com
🌐 github.com
2
3
November 4, 2022
How To Install Maven
Always appreciated, especially making it visible to new users. I personally use Maven Wrapper as well as mvnd (via sdkman), and other package managers are available, too. For example asdf. Anyway, maybe we can cut the JDK requirement in the future. 😉 Have you heard of the plans? More on reddit.com
🌐 r/Maven
3
5
July 25, 2025
Just curious, why maven doesn't have an installer? like JDK? and why installers don't set the path automatically to system variables themselves?
Sdkman will do all of this for you. Love it so much! More on reddit.com
🌐 r/learnjava
15
31
June 25, 2021
Java set up maven
You can start with the java jdk 17 and then switch if it doesn't work with the projects your professor gives you? If you dont want to use jdk 17, you can uninstall it and then install java jdk 11. Just make sure to google the steps to doing this. When you install the java jdk, it should path it correctly in your system. Intelijay uses marvin, so if anything you can just install intelijay. Their software is free to students. It also works really well in tomcat, however, after you graduate it is very expensive software. You may want to learn using netbeans for that reason. Good luck. More on reddit.com
🌐 r/learnjava
6
2
June 29, 2023
🌐
Apache Maven
maven.apache.org › download.cgi
Download Apache Maven – Maven
Maven is distributed in several formats for your convenience. Simply pick a ready-made binary distribution archive and follow the installation instructions.
🌐
Homebrew
formulae.brew.sh › formula › maven
Homebrew Formulae: maven
brew install maven · Also known as: mvn · Java-based project management · https://maven.apache.org/ License: Apache-2.0 · Development: Pull requests · Formula JSON API: /api/formula/maven.json · Formula code: maven.rb on GitHub · Bottle ...
🌐
DigitalOcean
digitalocean.com › community › tutorials › install-maven-mac-os
How to Install Maven on macOS | DigitalOcean
September 25, 2025 - This tutorial provides step-by-step instructions for installing Apache Maven on a macOS system. The guide begins by covering the prerequisite of installing a Java Development Kit (JDK), which is required for Maven to run. It then details three different installation methods: using the Homebrew package manager, using SDKMAN!, or performing a manual installation from the official binaries.
Find elsewhere
🌐
Medium
medium.com › @rajeshmuthusamy › maven-setup-with-mac-and-visual-studio-code-4622bd5d9fe4
Maven Setup with Mac and Visual Studio Code | by Rajesh Muthusamy | Medium
April 14, 2023 - You can do this by opening the Extensions panel on the left side of the editor and searching for “Java Extension Pack.” Once you find it, click the Install button. To create a Java project, open Visual Studio Code and select File > New Folder.
🌐
GitHub
gist.github.com › pruinis › 2328f2ca763159d9bea28c13e96a3706
Install-Maven-via-Homebrew.md · GitHub
==> Using the sandbox ==> Downloading https://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.t ==> Best Mirror http://supergsego.com/apache/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz ######################################################################## 100.0% 🍺 /usr/local/Cellar/maven/3.5.0: 106 files, 9.8MB, built in 15 seconds
🌐
MacPaw
macpaw.com › how to › optimization › apps
How to install Maven on Mac step by step
December 13, 2023 - You can then clear out all the files with a click and quickly revoke permissions for any apps you want. You can download CleanMyMac for free here and try it for yourself. The simplest way to install Maven is to use Homebrew, especially if you ...
🌐
Alexadam
alexadam.dev › blog › install-java-maven
How to install Java and Maven on MacOS, Linux and Windows
shmvn --version Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8) Maven home: /Users/user/Downloads/apache-maven-3.9.1 Java version: 17.0.6, ..... Go to https://www.oracle.com/java/technologies/downloads/ and select Windows. Download the x64 installer (the .exe file). Open the .exe ...
🌐
CodeJava
codejava.net › tools › maven › install-maven-on-macos
Download and Install Maven on macOS
August 1, 2022 - Check out this article to know how to install JDK on macOS. Apache Maven is distributed as a binary archive so you need to download a zip file from its official home page here. Click the link next to Binary zip archive, as shown below:It will download apache-maven-xxx-bin.zip file into your ...
🌐
Audvik Labs
blogs.audviklabs.com › home › installing maven on mac os
Installing Maven on Mac OS - Audvik Labs
March 13, 2023 - Now, Download Maven for Mac OS by going to the Maven Download site. ... After downloading, extract it using the below command. ... The binaries will be extracted in the “apache-maven-3.6.3” directory.
🌐
Sonatype
sonatype.com › maven-complete-reference › installing-maven
Install Maven: A Step-by-Step Installation Guide | Sonatype
To download Maven , go to and select the appropriate binary archive format for your platform. The contents of the zip or tar.gz are the same. ... There are wide differences between operating systems such as Mac OS X and Microsoft Windows, and ...
🌐
JUnit
junit.org
JUnit
JUnit artifacts are deployed to Maven Central and can be downloaded using the above links.
🌐
Mkyong
mkyong.com › home › maven › how to install maven on macos
How to install Maven on macOS - Mkyong.com
January 19, 2021 - This article shows how to install Maven (3.6.3) on macOS Big Sur (version 11.1).

Alternatively, I recommend installing Homebrew for these kinds of utilities.

Then you just install Maven using:

Copybrew install maven

PS: If you got a 404 error, try doing a brew update just before

Answer from brasskazoo on Stack Overflow
🌐
Apache Maven
maven.apache.org
Welcome to Apache Maven – Maven
Support for Maven is available in a variety of different forms.