标签:
# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2‘s installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------
——摘自"/bin/mvn"
由上可知:
必须的环境变量为 :JAVA_HOME
可选的环境变量为:M2_HOME 等
还需将 %M2_HOME%/bin 设置到path
安装步骤:获取版本,解压,设置环境变量,设置path
验证安装成功:
mvn --version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-1 Maven home: E:\e\maven\apache-maven-3.0.5\bin\.. Java version: 1.7.0_15, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.7.0_15\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 2003", version: "5.2", arch: "x86", family: "windows"
标签:
原文地址:http://www.cnblogs.com/zno2/p/4496690.html