https://maven.apache.org/download.cgi?Preferred=http%3A%2F%2Fmirror.bit.edu.cn%2Fapache%2F
下载 Maven, 并解压到某个目录。例如/Users/robbie/apache-maven-3.3.3
打开Terminal,输入以下命令,设置Maven classpath
$ vi ~/.bash_profile
添加下列两行代码,之后保存并退出Vi:
export M2_HOME=/Users/robbie/apache-maven-3.3.3
export PATH=$PATH:$M2_HOME/bin