I\'m trying to install maven through the terminal by following these instructions.
So far I got this
export M2_HOME=/user/apple/apache-maven-3.0.3 ex
This worked for me:
$ vim .bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
$ source .bash_profile
credit: http://www.mkyong.com/java/maven-java_home-is-not-defined-correctly-on-mac-osx/