Maven is build tool primary for Java projects. In this tutorial I will describe how to install maven on Windows 10 operating system.
Download and install Java
After Java (jre or jdk) is installed we need to download Apache Maven from official web site https://maven.apache.org/download.cgi. Currently the latest Maven version is
3.3.9. So we need to download
apache-maven-3.3.9-bin.zip. After archive is downloaded we need to extract it, e.g. to
Add System variables
Right click on the
Start button and select
System window click on
Advanced system settings in the left menu.
System properties pop-up will be opened.
Now we need to add the following variables to the
Add JAVA_HOME variable
JAVA_HOME points to the folder where java is installed and should have the value like this:
Add M2_HOME and MAVEN_HOME variables
MAVEN_HOME variables should have the same value and point to the folder where maven was extracted:
Add Maven to PATH variable
PATH variable in
System variables and click on
Edit button. The
Edit environment variable pop-up will be opened.
New button and add the following value:
Open terminal (command prompt) and enter the following:
The output should look like:
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T19:41:47+03:00)
Maven home: D:\tools\maven
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_111\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"