How to install Maven in windows?
To install Apache Maven on Windows, download the Maven’s zip file and unzip it to the directory you wish to install, and configure the Windows environment variables.
But for Maven to run properly we need to have following things installed and configured in our system
- JDK 1.7 or above
- Maven 3.3.9
- Windows 8
Note: Maven 3.3 requires JDK 1.7 or above to execute
JDK and JAVA_HOME
Make sure JDK is installed, and “JAVA_HOME” variable is added as Windows environment variable. You can refer to image below
Download Apache Maven
Go to Maven official website and download apache-maven-3.3.9-bin.zip and unzip it to folder you want to install maven.
Assume you unzip to this folder – H
Note: No installation is required.
Add M2_HOME and MAVEN_HOME
Now add both
MAVEN_HOME variables in the Windows environment, and point it to your Maven folder, in my case H
Now, add this Maven bin folder %M2_HOME%\bin is to be added in PATH variable so that we can run Maven’s command from anywhere.
All configuration steps are done, now it is time to verify whether all steps are done properly or not. Run mvn -version in the comman prompt and you will see below output.