建议安装3.3.9版本,最新版本貌似有点问题
下载地址:
#wget http://apache.fayea.com/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
解压
# tar -zxvf apache-maven-3.3.9-bin.tar.gz
# mv apache-maven-3.3.9 /bin/apache-maven-3.3.9
配置环境变量
#vi /etc/profile
export M3_HOME=/bin/apache-maven-3.3.9
export PATH=${M3_HOME}/bin:${PATH}
立即生效
#source /etc/profile
验证是是否成功
# mvn -v
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
Maven home: /bin/apache-maven-3.3.9
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /opt/jdk1.8.0_131/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-514.el7.x86_64", arch: "amd64", family: "unix"
本文转自 jackjiaxiong 51CTO博客,原文链接:http://blog.51cto.com/xiangcun168/1958424