How to install Maven on OSX 10.10 (Yosemite)?

Zach443 picture Zach443 · Nov 8, 2014 · Viewed 82.2k times · Source

I am trying to install Maven on my Mac, but I can not get the JAVA_HOME variable right. The path that the maven website gives is,

usr/java/jdk1.7.0_51

however the java folder does not exist in /usr/ for me. I installed the JRE and JDK, nothing changed. How can I fix this?

Answer

Adam Lukaszczyk picture Adam Lukaszczyk · Nov 28, 2014

Using brew - brew install maven - that's it.