The following MAVEN steps are installed on your Mac:
1. Download maven, http://maven.apache.org/download.cgi download
2. Download and unzip under downloads
3. Configure the Maven environment variable.
① Open terminal, enter vim ~/.bash_profile
② input I into edit mode and enter the MAVEN environment variable:
Export M2_home= "/users/huyuanping/downloads/apache-maven-3.5.4"
Export path= "$M 2_home/bin: $PATH"
With Echo $JAVA _home to see if Java_home is configured, and if Java_home is not configured, you also need to import the JAVA_HOME environment variable:
Export Java_home=/library/java/javavirtualmachines/jdk1.8.0_101.jdk/contents/home
Save and exit Press ESC +: wq+ Enter
4. Make Path settings effective
after you set up path, use the following command to make it effective:
source ~/.bash_profile
5. Test: Inputmvn-vView Maven No installation success
MAVEN installation and configuration under Mac