1 下载链接 http://maven.apache.org/download.cgi
2 解压 放在指定位置
3 配置
1)终端执行
vim ~/.bashrc
2)输入i进入编辑模式
export MAVEN_HOME=/User/dzgdp888/apache-maven-3.2.1(这是自己的maven所在路径)
export PATH=${PATH}:${MAVEN_HOME}/bin
3)保存退出vim界面,执行
先按esc 再输入 ":wq"
4)使环境变量立即生效
source ~/.bashrc
5)验证是否安装成功
mvn -v
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-15T01:37:52+08:00)
Maven home: /Users/dzgdp888/dev/apache-maven-3.2.1
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: zh_CN, platform encoding: EUC_CN
OS name: "mac os x", version: "10.11.2", arch: "x86_64", family: "mac"
4 Eclipse 插件maven