Installing Maven on Windows

Installing maven on windows is pretty simple. If your system doesn’t recognize Maven, it is probably because you have not correctly configured your environment variables. Let’s see how to install Maven and configure the environment variables now.

1. Download and extract Maven

Go to maven’s website and download the latest version of maven. I chose this one:

You should extract this to a folder of your choice. I put apache-maven-3.0.4 into C:\Program Files\Apache

2. Add the JAVA_HOME environment variable

If you don’t have JAVA_HOME already in your environment variables, add it now by going go My Computer -> View System Information -> Advanced -> Environment Variables.

Add the JAVA_HOME to “System Variables” with the location of your jdk installation. My location is
C:\Program Files\Java\jdk1.7.0_02

3. Add the MAVEN_HOME environment variable

Add MAVEN_HOME to “System Variables” with the location of your Maven installation. My location is
C:\Program Files\Apache\apache-maven-3.0.4

4. Add MAVEN_HOME to your Path

In order to access Maven from anywhere in your command window, you will need to add the following to your Path system variable.

I added this %MAVEN_HOME%\bin to my Path system variable.

5. Verify your Maven installation

Verify that Maven is correctly installed by opening a command window and typing mvn -version

You should see something like the following:


Post a Comment