Install Maven on Windows

install maven windows

In this small tutorial I will show how to easily install Apache Maven on your Windows computer.

Apache Maven is a widely-used tool in Java world. It is used for building java projects and includes a lot of useful features like dependency management, plugins, release management and many others.

Maven installation is not trivial, because Maven does not have an installation file. But the process is still extremely simple.

Requirements: you need to have jdk installed on your PC.

How to install Maven on Windows

Maven installation consists of 2 easy steps:

  1. Download and unzip the arhive from official site.
  2. Set system variables.

Use this link to download the latest stable Maven version. Then unzip the archive in some folder in your file system (the folder location will be used when setting the system variable).

Setting Maven system variables on Windows

Now you need to do 2 more things:

  • create M2_HOME system variable and set there a path where you unziped maven archive;
  • update PATH system variable – add %M2_HOME%\bin to its value.

When you are done with that you can check the success of Maven installation on Windows:

mvn -version

This command should result in something like this:

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T18:41:47+02:00)
Maven home: C:\Users\pooh\Downloads\apache-maven-3.3.9
Java version: 1.8.0_73, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_73\jre
Default locale: ru_RU, platform encoding: Cp1251
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"

Leave a Reply

Be the First to Comment!