Apache Maven Tutorial

Apache Maven is one of the most popular Software project management and comprehension tool, based on a central piece of information called Project Object Model (POM). Project based on Maven gets it’s compilation, build, reporting and documentation instructions from an xml file named pom.xml. Each maven project has a standard structure you can find in one of the example post given below.

pom.xml is a standard xml file complying maven schema, contains the dependencies required by your project, plugins your project might need, repository your project can look into to search for the dependencies, parent/child module information in case of multi-module projects, profile to support different builds for different situations/environments and many more features.

Most popular IDE’s (Eclipse, Intellij,..) provides full integration with maven, making maven use in your project a snap.

This Maven Tutorial series is based on Maven 3.1.1.


Maven Installation & Configuration

Maven Installation & Setup on Windows and Unix system
Install Maven on Windows and Unix-based System(Linux, Solaris and Mac OS X)

Maven Hands-on Examples

In this tutorial, we will go through the common setup of maven projects and different features maven provides, exploring them with help of fully-working examples.

Create a Maven Web Project with Eclipse
Simple HelloWorld web application project using Maven and Eclipse.

Create a Maven Web Project with CommandLine
Example showing creating a simple HelloWorld web application project from command line and then importing into Eclipse.

Creating Maven multi-module project with Eclipse
Creating a Multi-module project with command line and importing into Eclipse, showing reuse of a module by several projects.

References