
Next, edit ~/.profile in the editor of your choice, and add the following: export M2_HOME="/Users/johndoe/Development/apache-maven-3.0.5" You can choose something else if you wish. This is just my personal preference - to have a "Development" directory in my home directory. You can then shift the apache-maven-3.0.5 folder in your Downloads folder to wherever you want to keep Maven however as the rest of the process involves the command line, I recommend you do everything from there.Īt the command line, you would run something like: mv ~/Downloads/apache-maven-3.0.5 ~/Development/
#Homebrew install java 11 install
To install Maven on OS X, go to the Apache Maven website and download the binary zip file. Run mvn -version to verify that it is correctly installed.

#Homebrew install java 11 mac os x
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).


sudo port install maven will install latest Maven (?).brew install maven30 will install Maven 3.0 if needed.brew install maven will install latest Maven (3.5.2 on ).With Mac OS X 10.9 (Mavericks), Maven is not installed by default anymore. If Java is missing running $ java in a terminal will prompt you for the Java installation. 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.įirst of all, with previous versions of OS X, Maven is installed by default. Disclaimer: Here is a complete answer taking the last version of OS X (10.9 AKA Mavericks) into account.
