Maven 3.1.1- Installation on Windows

Apache Maven is a software project management tool based on Project Object Model (POM). Maven manages project building, reporting and documentation with help of powerful Maven plugins. Maven is a small binary distribution zip file. To install Maven 3.1.1 all that we need to do is download Maven, extract in some directory and configure couple of environment variables. Follow below steps for Maven 3.1.1 Installation on Windows

1. Install Java 1.7

Install Java 1.7 from oracle and set JAVA_HOME and Path variables to point Java 1.7 installation. For more information on how to install and setup Java 1.7 on windows see here .

2. Download Apache Maven 3.1.1

Download Apache Maven 3.1.1 from official Apache Maven website Select appropriate version like e.g 

3. Maven 3.1.1 Installation on Windows

Apache Maven contains set of files to be extracted to some place let say c:\maven  to be used. Just folders and files, that’s all no installation required.

4. Environment Variables

  • Path

Set JAVA_HOME and Path variables to appropriate Java installation as described in this post. Set Maven related variables. Add new MAVEN_HOME  to point Maven 3.1.1 installation folder.

MAVEN_HOME : C:\maven

Update Path  variable to point Maven bin folder, so that you can use Maven commands from command-line.

Path : MAVEN_HOME\bin;%Path%;

If you are using Maven in development or production for a large project, you may run out of memory. Set MAVEN_OPTS  to specify memory settings and other file encoding settings.

MAVEN_OPTS : -Xms256m -Xmx512m

5.Verification of Maven 3.1.1 installation

Open command prompt and issue the command mvn -version

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\shankar>mvn -version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 20:52:2
Maven home: C:\maven\bin\..
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_45\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

Leave a Comment