Apache Maven is a popular tool for managing Java-based projects. Here’s a step-by-step guide to installing Maven on Windows:
1. Download Maven
- Visit the official Apache Maven website: HERE.
- Download the latest binary zip file.
2. Extract the Files
- Extract the downloaded ZIP file to a preferred directory (e.g.,
C:\Program Files\Apache\Maven
). - Note the folder path where Maven is extracted.
3. Set Environment Variables
- Open the Start Menu and search for Environment Variables.
- Click Edit the system environment variables and then Environment Variables.
- Under System Variables, do the following:
- Add MAVEN_HOME:
- Click New.
- Enter
MAVEN_HOME
as the variable name. - Set the variable value to the Maven installation directory (e.g.,
C:\Program Files\Apache\Maven
).
- Add Maven to PATH:
- Locate the
Path
variable in the System Variables section and click Edit. - Add a new entry:
%MAVEN_HOME%\bin
.
- Locate the
- Add MAVEN_HOME:
4. Verify the Installation
- Open Command Prompt.
- Type:
- If Maven is installed correctly, you’ll see the Maven version, Java version, and environment details.
Notes
- Ensure Java is installed and the
JAVA_HOME
variable is set before installing Maven. - Restart your computer if the changes aren’t recognized immediately.
With these steps, Maven should be installed and ready to use on your Windows system!