1、下载:http://maven.apache.org/download.cgi
(安装参考:http://maven.apache.org/install.html)
2、配置环境变量
将解压后文件夹内bin目录配置到path
3、查看是否配置生效:mvn -v
- Check environment variable value
- echo $JAVA_HOME
- /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
- Adding to PATH
- export PATH=/opt/apache-maven-3.5.2/bin:$PATH