Maven installation

[b]check JDK and environment configuration[/b]
1. open cmd
2. echo %JAVA_HOME & java -version
C:\Users\XXX>echo %JAVA_HOME%
D:\Program Files\Java\jdk1.7.0_09

C:\Users\XXX>java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)


[b]maven installation[/b]
1. download [url]http://www.apache.org/dyn/closer.cgi/maven/maven-2/2.2.1/binaries/apache-maven-2.2.1-bin.zip[/url]
2. unzip to D:\Program Files\apache-maven-2.2.1
3. create new environment variable M2_HOME, point to D:\Program Files\apache-maven-2.2.1
4. add to path %M2_HOME%\bin
5. check whether the installation is successful, open cmd

C:\Users\XXX>echo %M2_HOME%
D:\Program Files\apache-maven-2.2.1

C:\Users\XXX>mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700)
Java version: 1.7.0_09
Java home: D:\Program Files\Java\jdk1.7.0_09\jre
Default locale: en_US, platform encoding: GBK
OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"


[b]installation plugin m2eclipse[/b]
1. open Eclipse
2. Help - Install New Software
3. click add and in location input: http://m2eclipse.sonatype.org/sites/m2e

[img]http://dl.iteye.com/upload/attachment/0076/5741/839e9742-2a40-3304-9ad8-a4eb3f72fc87.png[/img]

4. select "Maven Integration for Eclipse"
5. then step by step until ending installation
6. check whether it is successful
1)Help - about eclipse -install details, if exists Maven Integration for Eclipse(Required)
2)check if it can create maven project

[img]http://dl.iteye.com/upload/attachment/0076/5743/712b4c34-fbb2-3f18-9720-2bb58b3a6b70.jpg[/img]


[b]configuration[/b]
1. open home maven folder:C:\Users\XXX\.m2\settingd.xml(win7 location)
change <localRepository>D:/MavenRepository</localRepository>
this we designated lacal warehouse is D:/MavenRepository
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值