进入:
vi ~
export M2_HOME=/Users/robbie/apache-maven-3.3.3
export PATH=$PATH:$M2_HOME/bin
3> 输入命令以使bash_profile生效
bash_profile
$ source ~/.bash_profile
4> 输入mvn -v查看Maven是否安装成功
mvn -v
Maven