Skip to main content

Installing Apache Maven on Windows

Install Apache Maven locally on your Windows host according to the following procedure.

Prerequisites

In addition to the listed prerequisites, the following is needed to install the plugin under Windows.

Required Component

Version

Java JDK

1.8

Windows

10

Notice

Maven 3.2 requires JDK 1.8 or higher.

Installing Apache Maven

To install Apache Maven, follow the instructions below:

  1. Verify that JDK is installed, and JAVA_HOME is added as Windows environment variable.

  2. Go to Apache Maven, download the Maven zip file, for example : apache-maven-3.2.2-bin.zip. Extract it to the folder where you want to install Maven (e.g., C:\Program Files\Apache\maven).

  3. Add both the M2_HOME and MAVEN_HOME variables into the Windows environment, and point it to your Maven folder.

  4. In the PATH variable, append the Maven bin folder – %M2_HOME%\bin so that you can run the Maven’s command everywhere.

  5. To verify, open the command line interface (CMD) and run ‘mvn –version’ in the command prompt. The following list is returned:

For additional information, refer to the Apache Maven installation instructions.

C:\Users\davidp>mvn –version
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2018-06-17T21:51:42+08:00)
Maven home: C:\Program Files\Apache\maven
Java version: 1.7.0_65, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_65\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10.0", version: "6.3", arch: "amd64", pro: "windows"