Platinum Sponsors

SUN

ELCA

Gold Sponsors

Silver Sponsors

Partners

Partner events

Paul Gier

Paul Gier

(4840) Migrating from Ant to Maven: A JBoss Perspective

Technical long talk 50 min

Wednesday, 2008-06-25, 17:30 - 18:20, Arena 3

Paul Gier - Red Hat (speaker)

Rate this talk:

Topics

Abstract

The build system is an important, but often overlooked, part of any large 
software organization. As the size and number of projects within an organization 
grows, so do the size and complexity of the builds. A build system can include 
anything from just compiling and packaging code to a complex system that helps 
to automate the entire software life cycle. When most Java developers think of 
building and deploying their application, they normally think of Ant. However, 
this has started to change as a newer framework called Maven has emerged as a 
powerful tool for building software.

Due to Ant's simplicity and extensibility it went from a simple scripting tool 
to the de facto standard for building Java applications. Ant has the ability to 
automate many tasks including compiling code, creating jar files, and working 
with version control systems. These tasks are linked together to create a build 
script that can help with many aspects of a build system. However, as the build 
becomes more complex, the lack of a standard project structure, build life 
cycle, and dependency management system becomes a great weakness for ant.

Maven was designed from the ground up as a build system. Because of this design 
decision, a Maven based build can simplify configuration by making various 
assumptions about the default behavior of the build. These assumptions include 
things like the locations of project source code, documentation, test suites, 
and the steps involved in the build. Maven can encourage or enforce certain 
build configurations that help to standardize projects within an organization. 
This standardization makes the builds easier to use and maintain. Maven includes 
a flexible plugin framework that allows the default build process to be 
customized for each individual project’s needs. Maven also includes a powerful 
dependency management framework that allows a project to coordinate 
interoperation with other projects. Maven has many features designed 
specifically for building software that make it an indispensable tool for todays 
software projects.

The JBoss division of Red Hat develops several large open source Java 
applications. These include the JBoss application server, Hibernate, Seam, and 
several others. These applications primarily used Ant for builds, tests, 
releases and other parts of the project life cycle. As the size of these 
projects increased, several problems were experienced with the build system. The 
builds became difficult to maintain for current developers and difficult to 
understand and use for new developers. Managing the various project dependencies 
also became more difficult as dependency versions were changed, source code was 
moved, etc. There was also a lack of consistency from one project to the next. 
Since there were only minimal standards in place, the build scripts of the 
projects would be very different from each other. These and other issues led to 
the decision to migrate from Ant to Maven.

The goal of this session is to share the experiences of migrating a large 
software organization from Ant to Maven, in the hope that other developers can 
learn from these experiences and avoid some of the problems that can occur 
during the process. The strengths and weaknesses of Ant will be briefly 
discussed in comparison with the strengths and weaknesses of Maven. Depending on 
the situation, either Ant or Maven might be more appropriate, and some examples 
of when to use each tool will be given. This will be followed by an in depth 
discussion of the process of migrating several of the JBoss applications from 
Ant to Maven. This will include the reasoning behind the migration, the costs 
involved, and the results of the migration. Various aspects of the migration 
will be discussed including planning and strategy, problems experienced, common 
pitfalls, and finally the resultant benefits of the migration.

Media Partners

APRESS
inside-it
netzwoche
developpez
MokaByte