Setting Up Maven on Windows System

Here we learn Setting Up Maven on Windows System.

Maven is a build life cycle management tool. The real power of maven is in its plugin architecture. Plugins are available in maven for almost everything you want to do. This tutorial is just to setup Maven on windows system.

Prerequisite : java must be installed on the system and JAVA_HOME environment variable and system class path must be set for java. Read more about how to setup Java.

Step1: Download the latest version of maven from here. At the time of writing this tutorial the version available was 3.0.5.

Step2: You can download the binary zip because we do not plan to compile and build maven, we just want to install Maven to build other projects.

Step3: Extract downloaded zip into a folder. By default it would be ‘apache-maven-3.0.5’.

Step4: Setup environment variable MAVEN_HOME to the maven directory. For e.g. C:\apache-maven-3.0.5. Also, add this to windows class path. Read more on how to setup windows system variables and system class path.

Step5: Verify if Maven is successfully installed on your system. Open command prompt and type the command mvn -version. You should see the below:

Command Prompt Window to Verify Maven installation

 

You have successfully set up maven in your Windows System.

There might be a case where you get an error saying ‘mvn is not a recognized command‘ . In that case please re visit How to setup system variables and class path in Windows.

Please write a comment if you are not able to get this done. Stay connected and stay Subscribed