步骤
1.下载安装包
代码语言:javascript复制http://mirror.bit.edu.cn/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz
2.解压
代码语言:javascript复制tar xzvf apache-maven-3.6.1-bin.tar.gz
3.检查JAVA环境变量
代码语言:javascript复制echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
4.将bin目录加入PATH
代码语言:javascript复制export PATH=/opt/apache-maven-3.6.1/bin:$PATH
常用命令
代码语言:javascript复制debug模式执行install
mvn install -X
References
[1]
Installing Apache Maven: https://maven.apache.org/install.html
[2]
Mac OS X下安装和配置Maven: https://www.cnblogs.com/vitasyuan/p/7395601.html
[3]
题图: https://unsplash.com/