测试JAVA_HOME地址指令 echo %JAVA_HOME%
1.解压部署Maven核心程序
①检查JAVA_HOME环境变量
C:WindowsSystem32>echo %JAVA_HOME%
D:DevInstalljdk1.7.0_07
②解压Maven的核心程序
将apache-maven-3.2.2-bin.zip解压到一个非中文无空格的目录下。例如:D:DevInstallapache-maven-3.2.2
③配置环境变量
M2_HOME D:DevInstallapache-maven-3.2.2
path D:DevInstallapache-maven-3.2.2in
④查看Maven版本信息验证安装是否正确
C:WindowsSystem32>mvn -v
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T21:51:42+08:00)
Maven home: D:DevInstallapache-maven-3.2.2in..
Java version: 1.7.0_07, vendor: Oracle Corporation
Java home: D:DevInstalljdk1.7.0_07jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"