Maven Installation

Apache Maven on Windows

Download Maven’s zip file from Maven official website. Unzip the zip to the directory you wish to install.

maven-directory

Make sure JDK is installed, and “JAVA_HOME” variable is added as Windows environment variable.

C:\Users\Sree>java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

C:\Users\Sree>

java_home

Add M2_HOME and MAVEN_HOME in environment variables.

Click on New button and add variables.

maven_home

 

Capture

Append Maven bin folder to PATH variable, so that we can run the Maven’s command everywhere. Select Path variable and click on Edit button.

path

Click on New button, add %M2_HOME%\bin and click on OK.

mvn_bin

Click on OK –> OK to close. Open command prompt and run “mvn -version” to verify.

C:\Users\Sree>mvn -version
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T13:28:13+05:30)
Maven home: D:\Softwares\Build Tools\apache-maven-3.5.2\bin\..
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_45\jre
Default locale: en_IN, platform encoding: Cp1252
OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "windows"

C:\Users\Sree>

If you see a similar message, the Apache Maven is installed successfully on Windows.

Advertisements