Maven2 Tutorial
Maven is a high-level, intelligent project management, build and deployment tool provided by Apache?s software foundation group. Maven deals with application development lifecycle management. Maven was originally developed to manage and to minimize the co
Maven is a high-level, intelligent project management, build and deployment tool provided by Apache?s software foundation group. Maven deals with application development lifecycle management. Maven was originally developed to manage and to minimize the co
Maven2 Tutorial

Maven is a high-level, intelligent project management, build and deployment
tool provided by Apache?s software foundation group. Maven deals with
application development lifecycle management. Maven was originally developed to
manage and to minimize the complexities of building the Jakarta Turbine project.
But its powerful capabilities have made it a core entity of the Apache Software
Foundation projects. Actually, for a long time there was a need to standardized
project development lifecycle management system and Maven has emerged as a
perfect option that meets the needs. Maven has become the de- facto build system
in many open source initiatives and it is rapidly being adopted by many software
development organizations. This tutorial provides you introduction to Maven 2,
shifting from Ant to Maven, Maven basics, Installing and working with maven 2,
Maven plugins etc.
- An introduction to
Maven 2
Maven2 is an Open Source build tool that made the
revolution in the area of building projects. Like the build systems as
"make" and "ant" it is not a language to
combine the build components but it is a build lifecycle framework.
- Maven 2: Features
Maven
is a high-level, intelligent project management, build and deployment tool
provided by Apache's software foundation group. Maven deals with application
development lifecycle management.
- Shifting from Ant to
Maven
Maven is entirely a different creature from
Ant. Ant is simply a toolbox whereas Maven is about the application of
patterns in order to achieve an infrastructure which displays the
characteristics of visibility, reusability, maintainability, and
comprehensibility.
-
Common concerns to build a project
- Maven basics
1.
Project Object Model
A Project Object Model or POM is the
fundamental unit of work in Maven. It is an xml file that contains
information about the
project and configuration details used by Maven to build the project. It
contains default values for most projects.
2.
Repository
Another concept in Maven is that of a
repository. The repository holds the artifacts on which your project
depends. There are two kinds of repository: local and remote.
3.
Plugins
Maven provides a plugin execution framework and all work is done by plugins.
Maven plugins are available to execute any specific task.
- Installing
and Getting Hands on Maven
Now that we have sufficient understanding of
the pom.xml file let us get on try something out. Download Maven from
maven.apache.org, unzip the archive into your local directory.
-
Setting Up A Maven2 Repository
- Maven2 Repository:
An
introduction:
- Learn to Set Up An Internal Private Repository For An
Organization
We have set up an internal Maven Repository for
our organisation so that the developers are not wasting time in searching and
downloading the required project libraries. This also allows us to have a
single company wide repository for project artifacts.
- Directory Structure of Artifactory-1.2.2
- Deployment in Tomcat 6.0
Deploy the 'war' file of your application
in ?<ARTIFACTORY_INSTALLATION
_FOLDER>/webapp? to ?<TOMCAT_INSTALLATION_FOLDER>
/webapps?.
- Navigating Artifactory
Start Tomcat, open the browser and navigate http://localhost:8080/artifactory
-
Maven2 Plug-ins
Maven 2 Eclipse Plug-in
Plugins are great in simplifying the life of programmers; it actually
reduces the repetitive tasks involved in the programming. In this article
our experts will show you the steps required to download and install the
Maven Plugin with your eclipse IDE.
-
Develop java persistence example with Maven2
Getting Started with Maven2 : Download Maven2
from maven.apache.org, unzip the archive
into your local directory. Here we are assuming that the local repository already
exists.
-
create web application using maven
In this section, you will learn to create a web application using maven.
- maven jetty plugin
In this section, you will learn about implementing jetty plugin of maven inside web applications.
- Maven Compiler Plugin
In this section, you will learn about maven compiler plugin and how it can be
configure in maven.
- Enable Proxy Setting
- Change Local Repository
- Maven remote repository
- Generate a documentation site for Maven project
-
Convert Maven based web application to support eclipse
- Create project from Maven Template
Ads