码迷,mamicode.com
首页 > 其他好文 > 详细

4) Maven 安装

时间:2016-08-02 22:20:12      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:

# ----------------------------------------------------------------------------
# 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"

 

4) Maven 安装

标签:

原文地址:http://www.cnblogs.com/zno2/p/4496690.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!