maven讲解二

一  下载maven版本

地址:http://maven.apache.org/download.cgi

Maven 3.2.3

This is the current stable version of Maven.

  Link Checksum Signature
Maven 3.2.3 (Binary tar.gz) apache-maven-3.2.3-bin.tar.gz apache-maven-3.2.3-bin.tar.gz.md5 apache-maven-3.2.3-bin.tar.gz.asc
Maven 3.2.3 (Binary zip) apache-maven-3.2.3-bin.zip apache-maven-3.2.3-bin.zip.md5 apache-maven-3.2.3-bin.zip.asc
Maven 3.2.3 (Source tar.gz) apache-maven-3.2.3-src.tar.gz apache-maven-3.2.3-src.tar.gz.md5 apache-maven-3.2.3-src.tar.gz.asc
Maven 3.2.3 (Source zip) apache-maven-3.2.3-src.zip apache-maven-3.2.3-src.zip.md5 apache-maven-3.2.3-src.zip.asc
Release Notes 3.2.3    
Release Reference Documentation 3.2.3    

You can also download the current documentation, i.e. this website.

Maven 3.1.1


选择下载  apache-maven-3.2.3-bin.zip  


二  配置maven的环境变量


我的计算机--->属性-->高级系统设置--->环境变量-->系统变量---新建

变量名:M2_HOME

变量值:F:\apache-maven-3.2.3


然后再在path后面加上:%M2_HOME%\bin;,注意别忘记变量之间逗号隔号

然后运行---cmd--->输入命令:mvn -v

出现如下信息:显示了java的版本,maven的版本,说明maven环境变量已经配置正确




C:\Users\Administrator.WIN7U-20140607I>mvn -v
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T04:58:
0+08:00)
Maven home: F:\apache-maven-3.2.3
Java version: 1.7.0_60, vendor: Oracle Corporation
Java home: F:\Program Files\Java\jdk1.7.0_60\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
C:\Users\Administrator.WIN7U-20140607I>


三:配置eclipse中的maven

eclipse--->window-->maven-->install-->add

F:\apache-maven-3.2.3   



maven--userSettings-----browers--

apply--->OK





打开文件夹

F:\apache-maven-3.2.3\conf,找出setting.xml文件


将 /path/to/local/repo中值改为

 F:/repository












你可能感兴趣的:(工具使用和项目集成)