To install java, download JDK installer and add/update the JAVA_HOME
variable to JDK installation folder.
Maven can be downloaded from this location. I have extracted it in location – D:/Latest Setup/apache-maven-3.0.4
. You can choose your own location.
Set the M2_HOME
and MAVEN_HOME
variable to the maven installation folder.
To run a maven from the command prompt, this is necessary. Update the PATH
variable with 'Maven-installation/bin' directory
.
Maven installation is complete. Now, let's test it from windows command prompt.
Go to start menu and type cmd
in the application location search box.
Press ENTER
. A new command prompt will be opened.
Type mvn -version
in command prompt and hit ENTER
.
Console$ mvn -version
This should show the version information of the maven installed. If there is any error shown, cross-check all the above steps.
In this tutorial, we learned how to install maven on windows.
Happy Learning !!