Step 1: install the Apache maven on Mac
- download the maven file from http://maven.apache.org/download.cgi
- $tar xvf apache-maven-3.8.1-bin.tar.gz
- copy the apache folder to desired place $cp -R apache-maven-3.5.4 /usr/local
- go to apache directory $cd /usr/local/apache-maven-3.8.1/
- create .bash_profile $vim ~/.bash_profile
- write these two command :
- export M2_HOME=/usr/local/apache-maven-3.8.1
- export PATH=$PATH:$M2_HOME/bin
- save and quit the vim :wq!
- activate bash file source
~/.bash_profile
- restart the terminal and type mvn -version