Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven not found in Mac OSX mavericks

After upgrading my Mac OSX 10.8 to 10.9, Maven not found in the /usr/share path but its installed in 10.8.

when I try this command:

$ maven -version 

got this result

-bash: mvn: command not found

but it worked fine on 10.8? Any idea?

like image 1000
Sahil Mahajan Avatar asked Oct 30 '13 09:10

Sahil Mahajan


People also ask

Why mvn is not recognized in Mac?

Make sure that JAVA_HOME is set to the location of your JDK, e.g. export JAVA_HOME=/usr/java/jdk1. 5.0_02 and that $JAVA_HOME/bin is in your PATH environment variable. Run mvn --version to verify that it is correctly installed.

Where is my Maven installed Mac?

Some of the Mac OS X versions comes with Maven 3 built in, installation located at /usr/share/maven . To test Maven installed or not in your Mac issue command mvn -v in Terminal, it shows you installed version if already installed otherwise error.

How do you check Maven is installed or not on Mac?

2.3) Verifying the Maven Installation Finally, run the mvn -version command to check if Maven is installed successfully. The output shows maven home location, the JDK it's using and also the Mac OS version details. Maven is successfully installed in your Mac OS.


1 Answers

Maven is not installed any more by default on Mac OS X 10.9. You need to install it yourself, for example using Homebrew.

The command to install Maven using Homebrew is brew install maven

like image 141
DarkDust Avatar answered Oct 13 '22 05:10

DarkDust