Maven Introduction and Installation

Apache Maven is a software project management and comprehension tool.
Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

Maven's Objectives

Maven's primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal there are several areas of concern that Maven attempts to deal with:

Making the build process easy
Providing a uniform build system
Providing quality project information
Providing guidelines for best practices development
Allowing transparent migration to new features

Maven provides plenty of useful project information that is in part taken from your POM and in part generated from your project's sources.
For example, Maven can provide:

Change log document created directly from source control
Cross referenced sources
Mailing lists
Dependency list
Unit test reports including coverage

Maven aims to gather current principles for best practices development, and make it easy to guide a project in that direction.

For example, specification, execution, and reporting of unit tests are part of the normal build cycle using Maven. Current unit testing best practices were used as guidelines:

Keeping your test source code in a separate, but parallel source tree
Using test case naming conventions to locate and execute tests
Have test cases setup their environment and don't rely on customizing the build for test preparation.
Maven also aims to assist in project workflow such as release management and issue tracking.

Installing Maven on Windows:

Prerequisites: 

1. Windows
2. JDK

1. Install Java and setup JAVA_HOME variable in system variables
2. Dowmload Maven from the maven official site http://maven.apache.org/download.cgi
3. Create a folder named maven and extract the downloaded zip
4. Add a variable name MAVEN_HOME in system variables and point to the maven folder
5. Append the Maven bin path to the PATH variable.
6. Its Done. Lets check if it is working. Go to command prompt and type mvn -version. It should show something like
Apache Maven 2.2.1
Java version: 1.6.0_13
Java home: C:\Program Files\Java\jdk1.6.0_13\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"