Chapter 4. Migration of Dependencies to Apache Maven

Starting a new project from scratch is, from many viewpoints, the best situation: you can introduce Maven with best practices from the beginning. Anyway, often you receive a project which is built on another system: Apache Ant or even an Eclipse configuration (the .classpath, .project, and .launch files). In such a situation, migrating to Maven is perfectly mastered, provided you follow a rigorous process.

Case study

Let's consider a project, built thanks to an Ant build.xml file and targets. Let's have a look and comment what we can read:

<?xml version="1.0" encoding="ISO-8859-1" ?> <project name="ProjectFromAnt" default="generateJar"> <description> Example of project to migrate from Ant to Maven ...

Get Apache Maven Dependency Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.