Install and configure Maven on Windows

To install and configure Maven on Windows, you can follow these steps:

  1. Download Maven from the official website: Choose the latest binary zip archive for Windows, and download it to your preferred directory.

  1. Extract the downloaded zip file to a directory on your system. For example, you could extract it to the "C:\Program Files" directory.
  1. Set the environment variables for Maven. Open the Start menu and search for "Environment Variables". Click on "Edit the system environment variables".
  1. In the System Properties window, click on the "Environment Variables" button.
  1. Under the System Variables section, click on "New" to create a new variable. Set the variable name as "MAVEN_HOME" and the variable value as the path to your Maven installation directory. For example, "C:\Program Files\apache-maven-3.9.0".
  1. Next, find the "Path" variable under System Variables and click "Edit".
  1. In the Edit environment variable window, click "New" and add the path to the "bin" directory within your Maven installation directory. For example, "C:\Program Files\apache-maven-3.9.0\bin".
  1. Click "OK" on all the windows to save the changes.
  1. Open a new command prompt window and run the command "mvn -version" to verify that Maven is installed correctly. You should see the version of Maven printed on the console.
> mvn -version

Congratulations, you have successfully installed and configured Maven on your Windows system!