How to install Maven on Windows 10

In order to install maven on a Windows machine you will need to install JDK first as Maven is a Java based tool. If you are installing Maven 3.3 then you required JDK version 1.7 or above.

If JDK is already installed on your Windows machine then you can jump to maven installation steps which I have mentioned below. To install JDK you may refer my earlier post for step by step guideline.

Steps to install Maven on Windows 10

  1. Set JAVA_HOME path
  2. Download Maven Zip
  3. Setup environment variable for Maven (M2_HOME)
  4. Verify installation

1) Setup JAVA_HOME

Please make sure you have set the JAVA_HOME path after installation of the JDK. You may refer my previous article to setup JAVA_HOME path in Windows machine.

How to set JAVA_HOME path in Windows 10

2) Download Maven Zip

Download maven zip file from the official website and extract it to the directory you wish to install. And configure the environment variable. I have downloaded apache-maven-3.5.0-bin.zip under C:\Program Files\Maven for demonstration purpose.

3) Add new environment variables for Maven (M2_HOME) and append it to the PATH variable

Add M2_HOME variables in the Windows environment variable, and point it to your Maven folder.

Update PATH variable and append maven bin folder %M2_HOME%\bin to PATH variable

4) Verify Installation

Go to windows command line and verify maven setup.

mvn -version

(Visited 1,972 times, 304 visits today)