Maven is a build tool and is used to build a software project.
Here are the steps to install Maven on windows:
- First we need to download maven and extract it
- Add/Update environment variables e.g JAVA_HOME and MAVEN_HOME.
- Need to Add above maven path in PATH environment variable.
- Verify if Maven is installed or needs debugging
- Download Maven
Download latest version of maven from https://maven.apache.org/download.cgi
Pick binary version for windows e.g apache-maven-3.9.8-bin.zip
Unzip above binary file to a folder where you want to keep this maven installation.
2. Setting environment variable
We need to add both environment variables JAVA_HOME and MAVEN_HOME variables
to the Windows environment using system properties and then point them to the folder
where we have unzipped the binary zip file.
We add above 2 environment variable by following below steps:
To do that first Right click on MyComputer then select properties and
go to Advanced System Settings then select Environment variables and
click on new button
3. Update PATH environment variable
In next step we need to update PATH variable by appending above
MAVEN_HOME/bin variable e.g PATH=%MAVEN_HOME%bin
4. Verify
Now verify if the installation is successful by command mvn -version
This should show the installed maven version and we are very ready to
build project using maven now.