Maven的安装、配置和使用

2016-06-04  本文已影响29人  nanhangfei

下载

http://maven.apache.org/download.cgi

设置环境变量

  1. 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

  1. 使.zshrc配置立即生效

source ~/zshrc

执行命令

mvn clean
mvn package

上一篇下一篇

猜你喜欢

热点阅读