Apache Maven – Install on Windows 7 OS

In this article, we will learn on how to setup Apache Maven in Windows 7 Operating Systems

Apache Maven is a build tool and it is not specific to any environment, so if one wish to prefer using Maven in Linux OS or Mac OS then they can very well go ahead. But, here we are installing Apache Maven in Windows 7 OS environment

Technology Used:

  • JDK 1.7
  • Apache Maven 3.2.3
  • Windows 7 OS

Apache Maven Installation Steps:

  • Make sure JDK is installed and JAVA_HOME is set as Windows environment variable
    Verify this using command “java -version
  • Download latest Apache Maven and extract to suitable location
  • Set MAVEN_HOME as Windows environment variable
  • Add Maven to “path” environment variable
  • Verify Maven, using command “mvn –version

Step 1: Verify whether JDK installed and JAVA_HOME is set

JAVA_HOME = C:\Program Files\Java\jdk1.7.0_06

1_Apache-Maven-Installation-Win7OS_JDK_installed

Note: From Maven 3.2 onwards, JDK 1.6 or higher version is required

Step 2: Download Apache Maven and extract to suitable location

Download latest Apache Maven-3.2.3 from here and extract to some suitable location like “D:\Downloads\Software\apache-maven-3.2.3

2_Apache-Maven-Installation-Win7OS_Maven_extract_location

Step 3: Add MAVEN_HOME to Windows environment variable –> pointing to Maven folder

MAVEN_HOME = D:\Downloads\Software\apache-maven-3.2.3

3_Apache-Maven-Installation-Win7OS_Maven_home_setting

Step 4: Add Maven to “path” environment variable

Append “%MAVEN_HOME%\bin;” to PATH environment variable

4_Apache-Maven-Installation-Win7OS_Maven_path_setting

Step 5: Verify Maven

Everything is done, just verify whether maven working or not using command “mvn –version” in command prompt

5_Apache-Maven-Installation-Win7OS_Maven_working_verify

Conclusion: We have successfully installed Apache Maven on Windows environment

Useful Eclipse IDE shortcuts :

Related Articles:

Happy Coding !!
Happy Learning !!

Apache Maven - Settings.xml explanation
Apache Maven - Introduction