Learn how to install Maven on Windows in this article. This step-by-step guide walks you through the process of downloading and setting up Maven on your Windows PC. All you need is a stable internet connection and the Java JDK version 8 or higher. Once installed, you can easily use Maven from the command line. With this guide, you will have Maven up and running in no time.
Prerequisites
Step 1: Download Maven
Download Maven from the official website: https://maven.apache.org/download.cgi. Select the current stable version and download the binary zip file.
Step 2: Extract Maven
Extract the downloaded zip file to a folder of your choice, e.g. C:\apache-maven
.
Step 3: Set environment variable
To be able to run Maven from the command line, you need to set the MAVEN_HOME environment variable and add Maven's bin directory to the PATH environment variable.
C:\apache-maven
.Step 4: Test Maven
Open a command prompt and enter the command mvn -v
. If Maven is installed successfully, the Maven version and the path to the Maven installation will be displayed.