1. Download Maven
- Visit the Apache Maven Download Page:
Go to the official Apache Maven website: Apache Maven 3.9.9 Download.
2. Download the Binary Distribution:
2. Install Maven on Windows
1. Extract the Archive:
Locate the downloaded .zip file and extract it to your preferred installation directory (e.g., C:\Program Files\Apache\Maven).
2.Set Environment Variables:
- MAVEN_HOME:
Right-click on This PC or Computer on the desktop or in File Explorer and select Properties.
Click on Advanced system settings.
In the System Properties window, click on the Environment Variables button.
In the Environment Variables window, click New under System variables.
Set the variable name as MAVEN_HOME and the value to the path where you extracted Maven (e.g., C:\Program Files\Apache\Maven\apache-maven-3.9.9).
3.Update PATH:
In the same Environment Variables window, find the Path variable in the System variables section and select it.
Click Edit, then New, and add the following:
%MAVEN_HOME%\bin
Click OK to close all dialog boxes.
Verify Installation:
Open a Command Prompt window (search for cmd in the Start menu) and run:
mvn -version
You should see output indicating the installed Maven version, which confirms that Maven is installed correctly.