How to install Maven in Windows machine.

In this article, I will show, how to install Maven on the windows machine. 

Maven is the tool mainly used to build the project Java projects. You can get more information about maven from http://maven.apache.org/what-is-maven.html


JDK needs to be installed before Maven installed. Also, make sure that the JAVA_HOME environment variable is pointing to JDK.

set-java-home - Install Maven
Once its done, download Maven from its official site http://maven.apache.org/download.html 

download Binary Zip file and extract it on the local folder (ex. c:/maven)

Set MAVEN_HOME to installed location (c:/maven in our case) same as we have done for JAVA_HOME


Now double click on the PATH variable and add  %MAVEN_HOME%bin at the end. Don’t forget to put a semicolon (‘;’) before putting %MAVEN_HOME%bin


For example, if PATH is set as D:softSSH then first put semicolon (‘;’) and then put %MAVEN_HOME%bin so that it will be looks like D:softSSH;%MAVEN_HOME%bin


On completing this, just open the command prompt and type mvn -version. On successful completion, you can get the following output on the command prompt, 
mvn-installed - install maven

And this is done. This is how you can install maven on your windows machine.

About the Author: Nilang

Nilang Patel is a technology evangelist who loves to spread knowledge and helping people in all possible ways. He is an author of two technical books - Java 9 Dependency and Spring 5.0 Projects.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.