Thứ Tư, 27 tháng 3, 2013

How to install Maven on Windows

Apache Maven is not require to install on Windows as a service component, you just need to download the Maven’s zip file, extract it and configure the Windows environment path variable.
Tools Used :
  1. JDK 1.6
  2. Maven 2.2.1
  3. Windows 7
P.S This works with Maven 3 also.

1. JDK and JAVA_HOME

Make sure JDK is installed, and “JAVA_HOME” variable is added in Windows environment variable, and point to the JDK folder.

2. Download Apache Maven

Visit this Maven official website, choose a version and click on the download link, e.g apache-maven-2.2.1-bin.zip.

3. Extract It

Extract the downloaded zip file. In this case, we extracted to d driver and renamed the folder, e.g D:\maven.
Note
That’s all, just folders and files, installation is NOT required on Windows.

4. Add MAVEN_HOME

Add a new MAVEN_HOME variable to the Windows environment, and point it to your Maven folder.

5. Add PATH

Update PATH variable, append “Maven bin folder” path, so that you can run the Maven’s command everywhere.

6. Verification

Done, to verify it, in command prompt, type “mvn –version“.
C:\Documents and Settings\mkyong>mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-07 03:16:01+0800)
Java version: 1.6.0_13
Java home: C:\Program Files\Java\jdk1.6.0_13\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
If you see similar message, means your Apache Maven is installed successfully on Windows.



NOTE SPECIAL: 
When run maven build failed and show error ANDROID_HOME
You must add ANDROID_HOME to Windows environment
Variable name :  ANDROID_HOME
Variable value : E:\eclipse\SDK\adt-bundle-windows-x86_64-20130219_3\sdk

Không có nhận xét nào:

Đăng nhận xét

Học lập trình web căn bản với PHP

Bài 1: Các kiến thức căn bản Part 1:  https://jimmyvan88.blogspot.com/2012/05/can-ban-lap-trinh-web-voi-php-bai-1-cac.html Part 2:  https://...