You can download and install maven on windows, linux and MAC OS platforms. Here, we are going to learn how to install maven on windows OS.
Install Maven on Mac OS X. Step 1: Download Apache Maven from maven.apache.org. Choose one release of Maven to download. Here, I downloaded the Apache Maven 3.6.3 release. Step 2: Unzip the downloaded maven file in any directory using the unzip or tar command. Tar xzvf apache-maven-3.6.3-bin.tar.gz. Unzip apache-maven-3.6.3-bin.zip. The Maven installation is essentially a set of JAR files, configuration files, and a Mac OS X shell script, namely mvn. The mvn command essentially runs this script. It first checks for JAVAHOME.This file is present in the bin folder of the Maven installation and, hence, it needs to be in PATH. If the shell script does not find JAVAHOME, it looks for Java in its PATH.
To install Maven on Mac OS X operating system, download the latest version from the Apache Maven site, select the Maven binary tar.gz file, for example: apache-maven-3.3.9-bin.tar.gz. Extract the archive to your desired location. Adding Maven to the Environment Path.
To install maven on windows, you need to perform following steps:
- Download maven and extract it
- Add JAVA_HOME and MAVEN_HOME in environment variable
- Add maven path in environment variable
- Verify Maven
1) Download Maven
To install maven on windows, you need to download apache maven first.
Download Maven latest Maven software from Download latest version of Maven
For example: apache-maven-3.1.1-bin.zip
![Maven download for windows 10 Maven download for windows 10](/uploads/1/2/9/4/129450295/287283491.jpg)
Extract it. Now it will look like this:
2) Add MAVEN_HOME in environment variable
Right click on MyComputer ->properties ->Advanced System Settings ->Environment variables ->click new button
Mac Os Download For Vmware
Now add MAVEN_HOME in variable name and path of maven in variable value. It must be the home directory of maven i.e. outer directory of bin. For example: E:apache-maven-3.1.1 .It is displayed below:
Now click on OK button.
3) Add Maven Path in environment variable
Click on new tab if path is not set, then set the path of maven. If it is set, edit the path and append the path of maven.
Here, we have installed JDK and its path is set by default, so we are going to append the path of maven.
Download Apache Maven For Mac Os
The path of maven should be %maven home%/bin. For example, E:apache-maven-3.1.1bin .
4)Verify maven
To verify whether maven is installed or not, open the command prompt and write:
Now it will display the version of maven and jdk including the maven home and java home.
Let's see the output: