1、下载maven
2、配置环境变量
vim .bash_profile
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME
export PATH
#maven
export MAVEN_HOME=/Users/haines/desktop/work/java/apache-maven-3.8.4
export PATH=$MAVEN_HOME/bin:$PATH