下载
http://maven.apache.org/download.cgi
设置环境变量
- vim ~/.zshrc,并添加如下内容
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
export PATH=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin:$PATH
export MAVEN_HOME=/opt/apache-maven-3.3.9
export PATH=/opt/apache-maven-3.3.9/bin:$PATH
export MAVEN_OPTS=-Xmx512m
- 使.zshrc配置立即生效
source ~/zshrc
执行命令
mvn clean
mvn package