maven安装

来源:互联网 发布:淘宝客招募令模板 编辑:程序博客网 时间:2024/05/21 16:22

下载maven2

http://books.sonatype.com/mvnref-book/reference/installation-sect-maven-download.html#_downloading_maven_2


下载maven3

http://books.sonatype.com/mvnref-book/reference/installation-sect-maven-download.html#_downloading_maven_3



解压下载安装包

M2_HOME=解压目录

path=%M2_HOME%\bin


运行

mvn-v


yeah,成功


Installing Maven on Windows is very similar to installing Maven on MacOSX, the main differences being the installation location and thesetting of an environment variable. This book assumes a Maveninstallation directory ofc:\Program Files\apache-maven-3.0.3, butit won’t make a difference if you install Maven in another directoryas long as you configure the proper environment variables. Once you’veunpacked Maven to the installation directory, you will need to set twoenvironment variables—PATH andM2_HOME. To set these environmentvariables from the command-line, type in the following commands:

C:\Users\tobrien > +set M2_HOME=c:\Program Files\apache-maven-3.0.3+C:\Users\tobrien > +set PATH=%PATH%;%M2_HOME%\bin+

Setting these environment variables on the command-line will allow youto run Maven in your current session, but unless you add them to theSystem environment variables through the control panel, you’ll have toexecute these two lines every time you log into your system. Youshould modify both of these variables through the Control Panel inMicrosoft Windows.






http://books.sonatype.com/mvnref-book/reference/installation.html

原创粉丝点击