一、maven配置
1.下载maven https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
如果大家要下指定的安装包,请到官网下载:http://maven.apache.org/download.cgi
2.解压下载的包
tar zxvf apache-maven-3.3.9-bin.tar.gz
解压为/duoceshi/software/apache-maven-3.3.9目录
3.配置环境变量
3.1
cat >>/etc/profile
export M2_HOME=/duoceshi/software/apache-maven-3.3.9
export PATH=$PATH:$M2_HOME/bin
3.2
ctrl + d保存结束
3.3设置生效
source /etc/profile
4.验证安装是否成功
-bash-4.1# mvn --version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
Maven home: /duoceshi/software/apache-maven-3.3.9
Java version: 1.7.0_15,vendor: Oracle Corporation
Java home: /duoceshi/jdk1.7.0_15/jre
Default locale: en_US,platform encoding: UTF-8
OS name: "linux",version: "2.6.32-642.3.1.el6.x86_64",arch: "amd64",family: "unix"
二、常用命令参数