How to install Apache Maven 3.6.1 on Windows 10?

How to install Apache Maven 3.6.1 on Windows 10?

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information. It is a build automation tool and it is used by almost all Java projects. It automatically downloads the libraries and dependencies from the Maven repositories and store it into local machine cache. – by maven.apache.org

PREREQUISITES

  1. JDK

download

We can download the latest version of Apache Maven from the Maven official site. The Official site link has been given below.

https://maven.apache.org/download.cgi

I have downloaded the apache-maven-3.6.1 version zip file and saved into my machine.

Apache Maven zip file

Extract the downloaded zip file now. The extraction may take time depending the file size.

Maven Extracted folder

SET ENVIRONMENT VARIABLE

Follow the below steps to set the environment variable for Maven. The steps are given below .

#1. Go to the My Computer –> Properties

This image has an empty alt attribute; its file name is image-4.png
My Computer –> Properties

#2. Open the Environment Variable window by clicking the Advanced System Settings –> System Properties –> Environment Variables…

Environment variables

#3. Select the System variable “Path” and click the “Edit” button.

System variables

#4. Click the “New” button on the edit environment variable window and the add the Maven extracted file location up to the bin folder and then click “OK” button. In my system, I have downloaded and extracted the Maven zip file on the following location up to bin folder.

C:\softwares\apache-maven-3.6.1\bin
Maven Environment Path

M2_HOME

The mvn script computes M2_HOME automatically. No need to set the M2_HOME environment path. Refer the below stackoverflow.com link to see the answer.

https://stackoverflow.com/questions/26609922/maven-home-mvn-home-or-m2-home

Click “OK” button on all opened windows and open the new command prompt to execute the following command to check the Maven version. The Maven version should be 3.6.1

mvn -version

Apache Maven 3.6.1 has been installed successfully on Windows 10.

How useful was this post?

Click on a star to rate it!

As you found this post useful...

Follow us on social media!

Advertisements

Post your comments