In this tutorials, I am going to show you how to install Maven on Windows10 operating system.
Download Maven :
Download the Maven latest version from maven downloads. For me it is apache-maven-3.5.2-bin.zip.
Install Maven on Windows10 :
Extract the downloaded maven .zip file at your favorite location and proceed the below steps.
Note : To set up maven on your local machine, it is necessary to have JAVA_HOME setup. I have discussed how to setup JAVA_HOME on windows 10 in my previous tutorials, if you doesn’t set JAVA_HOME on your machine, please complete the JAVA_HOME setup first and proceed further steps.
After extracting the apache-maven-3.5.2-bin.zip file, folder consists like below. I have extracted in “E:\Softwares\apache-maven-3.5.2“..
Setup Maven to Path :
Go to Advanced System Settings :
Search for Advanced System Settings in Search box like below:
by selecting the above Advanced System Settings you can see the below System Properties window there you can find Environment Variables button.
Click on Environment Variables > There you can find System variables section.
select Path variable and click on Edit button. Now opens another window like below: This is new widow introduced from Windows10.
Here click on new button and add environment variable E:\Softwares\apache-maven-3.5.2\bin (your maven folder location till \bin) like below.
And Click on OK.
You can check your setup, by firing the bellow command on your windows command prompt.
Type mvn – version and Enter : It will give installed maven version with JAVA_HOME like below.
C:\>mvn -version Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T13:28:13+05:30) Maven home: E:\Softwares\apache-maven-3.5.2\bin\.. Java version: 1.8.0_151, vendor: Oracle Corporation Java home: C:\Program Files\Java\jre1.8.0_151 Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Happy Learning 🙂