How to install maven on windows 7

Maven is a build and dependency management tool for java based application development. Just like other java based development tools, it is not installed as windows service, rather it is configured using windows environment variables. These variables can be accessed from below location:

Control Panel > All Control Panel Items > System > Advanced system settings > Environment Variables

In this post, I will summarize the steps needed to install maven on windows 7 operating system.

Step 1) Install Java if not already done

To install java, download JDK installer and add/update the JAVA_HOME variable.

Set_java_home_in_windows

Step 2) Download Maven and extract it to desired location

Maven can be downloaded from this location. I have extracted it in location : D:Latest Setupapache-maven-3.0.4. You can choose your own.

Now, set the MAVEN_HOME variable just as you did for JAVA_HOME variable.

set_maven_home

Step 3) Update PATH variable

To run maven from command prompt, this is necessary. Update the PATH variable with Maven’s installation bin directory.

set_maven_path_variable

Step 4) Test the installation

Maven installation is complete. Now lets test it from windows command prompt. Go to start menu and type cmd in application location search box. Press ENTER. A new command prompt will be opened. Type mvn -version in command prompt and hit ENTER.

test_maven_cmd

This should show the version information of maven installed. If there is any error shown, cross-check all above steps.

Happy Learning !!

14 thoughts on “How to install maven on windows 7”

  1. could not find or load main class org.codehaus.plexus.classworlds. launcher error my system

    I am using Windows 8

    Jdk 8

Note:- In comment box, please put your code inside [java] ... [/java] OR [xml] ... [/xml] tags otherwise it may not appear as intended.

Leave a Reply

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


nine − = 4

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>