Install homebrew
Install java and maven
> brew install java
> brew install maven
> vi ~/.bash_profile
> export JAVA_HOME=$(/usr/libexec/java_home)
> source ~/.bash_profile
Note:
On Reboot, when it says some reference is missing just type source ~/.bash_profile