How to Download and Install Apache Maven 3.2.2 on Windows

2 minute read

download install maven 3-2-2 windows

Do you want to download and install Apache Maven 3.2.2 on Windows?

Then check this out:

In this tutorial, I’ll show where to download Maven.

How to configure it.

(And above all) how to check if everything is working.

So here we go.

Check following posts if you are looking to download and install Maven 3.2.5, Maven 3.3.9, Maven 3.5.0 or the latest Maven version.

What is Apache Maven?

Maven is a build automation tool. It addresses two aspects of building software:

  • It describes the different steps in the build process.
  • It describes the dependencies to other modules and components.

The Maven project is part of the Apache Software Foundation. Which is a decentralized open source community of developers.

Step #1: Check Prerequisites

Maven requires Java to work. So let’s check if you have Java configured on your system.

Click on the search button. Then type “cmd” (without quotes).

If you have Windows 7 click on the Windows button.

Click on the Command Prompt shortcut.

windows search cmd

Wait for the command prompt to open.

Type “java -version” and press ENTER.

java version command

The above command prints the installed Java version.

java installed version

For Maven 3 you need Java version 1.7 or higher.

If you do not have Java installed on your system. Check following post which details how to install a JDK on Windows 10.

Step #2: Download

Go to the Maven 3 archives page.

Click on the 3.2.2/ folder.

maven 3-2-2 download archive

Click on binaries.

maven 3-2-2 distribution

Click on the apache-maven-3.2.2-bin.zip link.

maven 3-2-2 binaries

Wait for the download to complete.

Do you want to skip the above steps? Here is the direct link to download the Maven 3.2.2 binary for Windows.

Step #3: Install

Open the location of the downloaded installer.

maven 3-2-2 downloaded binary

Right-click the ZIP archive file. Select Extract All….

maven 3-2-2 downloaded binary extract all

Select an extract destination for the Maven files.

In this example, we extract in C:\Users\Downlinko\tools\maven.

tools-extract-destination

Click on Extract. This extracts all Maven files under C:\Users\Downlinko\tools\maven\apache-maven-3.2.2.

From now on we refer to this location as [MAVEN_INSTALL_DIR].

maven 3-2-2 install dir

Step #4: Setup

We need to set up an environment variable that will point to our Maven installation.

Click on the search button. Then type “env”.

If you have Windows 7 click on the Windows button.

Click on the Edit environment variables for your account shortcut.

windows search env

Wait for the environment variables window to open.

Click on New….

windows account environment variables jdk new

Enter “M2_HOME” as variable name. Enter the [MAVEN_INSTALL_DIR] as variable value.

In this tutorial the installation directory is: C:\Users\Downlinko\tools\maven\apache-maven-3.2.2.

Click OK.

maven 3-2-2 home variable

Next, we need to configure the PATH environment variable so we can run Maven from a command prompt.

Select the PATH variable. Click on Edit….

maven 3-2-2 edit path variable

Click on New and type “%M2_HOME%\bin” as shown below.

Click OK.

maven path variable

Click OK once more to close the environment variables window.

maven 3-2-2 windows account environment variables

On Windows 7 you cannot add extra values for an existing Path variable. You need to append “;%M2_HOME%\bin” at the end of the variable value instead.

Step #5: Test

To test the setup click on the search button. Then type “cmd”.

Click on the Command Prompt shortcut.

windows search cmd

Wait for the command prompt to open.

Type “mvn -version” and press ENTER.

maven version command

The above command prints the installed Maven version.

maven 3-2-2 version output

Congratulations, you have installed Maven 3.2.2 on Windows 10!

Now go ahead and create your first Maven project.

Good luck and let me know if you liked this post.

Thanks!

Leave a comment