Thursday, January 30, 2025
HomeComputer ScienceHow to Install Maven on Windows

How to Install Maven on Windows

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

  1. Visit the official Apache Maven website: HERE.
  2. Download the latest binary zip file.

2. Extract the Files

  1. Extract the downloaded ZIP file to a preferred directory (e.g., C:\Program Files\Apache\Maven).
  2. Note the folder path where Maven is extracted.

3. Set Environment Variables

  1. Open the Start Menu and search for Environment Variables.
  2. Click Edit the system environment variables and then Environment Variables.
  3. Under System Variables, do the following:
    • Add MAVEN_HOME:
      1. Click New.
      2. Enter MAVEN_HOME as the variable name.
      3. Set the variable value to the Maven installation directory (e.g., C:\Program Files\Apache\Maven).
    • Add Maven to PATH:
      1. Locate the Path variable in the System Variables section and click Edit.
      2. Add a new entry: %MAVEN_HOME%\bin.

4. Verify the Installation

  1. Open Command Prompt.
  2. Type:
    mvn -version
  3. If Maven is installed correctly, you’ll see the Maven version, Java version, and environment details.
See also  What is the Function of SQL CREATE TABLE Statement?

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!

RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x