Install Maven on Windows

In this tutorial we explain how to install Apache Maven on Windows.

1. Requirements

  • Maven 3.3.3 binary zip file.
  • JDK 1.7 or higher (if you install Maven 3.2, JDK 1.6 is sufficiant; Maven 3.0 /3.1 runs with JDK 1.5).
  • Windows 🙂 (XP, Vista, Windows 7, Windows 8 are all supported; I never tried with Windows 2000 or Windows 98 but it should work since it uses batch files).
  • About 10 MB of disk space.

2. Install Maven on Windows

  1. Unzip Maven in a folder of your choice: We use E:\Developer\Maven\apache-maven-3.3.3
  2. Add the unzipped bin path to the PATH variables:
    1. Press Winkey + Pause.
    2. Go to the Advanced tab.
    3. Click the Environment Variables button.
    4. Add the bin path to User Variables: E:\Developer\Maven\apache-maven-3.3.3\bin
  3. While editing the User Variables, make sure JAVA_HOME user variable exists. For us: C:\Program Files\Java\jdk1.8.0_45\jre

3. Verify Maven Installation

  1. Open command line via Winkey + R and enter cmd
  2. Type “mvn –version” to check if maven is installed correctly.
C:\Users\Sander>mvn --version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:3 7+02:00)
Maven home: E:\Developer\Maven\apache-maven-3.3.3\bin\..
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_45\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

If you see a similar output, Maven is installed correctly.


Related posts

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.