Make Sure JAVA_HOME has been setup
Before we configure Maven, we need to make sure JAVA_HOME is setup properly.
if there is nothing comes out, that means you didn’t set JAVA_HOME up before. You can follow the instructions as follow. If you have configured it correctly, just ignore it.
sudo vi /etc/profile(or ~/.bash_profile or /etc/bashrc)
Set up Maven
We can download the latest version of maven, then unzip to the installing folder(/usr/local/opt/maven3). Later, we also need to register maven into environment variable files.
sudo vi /etc/profile