THIS is how to do a major upgrade

Posted by admin, Mon Aug 28 10:11:40 UTC 2006

Maven – Guide to Moving From Maven 1.x to Maven 2.x

It is possible to establish parallel Maven builds, one using the old M1 settings, and a second using M2. The Maven 2 configuration file names and uses have been modified, so the two builds should not conflict.

A Maven 1.x build is configured with the following files:

  • [project.xml] Project Object Model (POM) definition
  • [maven.xml] Custom build scripts
  • [project.properties] general build settings
  • [build.properties] local build settings

    A Maven 2 build is configured with a different file set:

  • [pom.xml] POM definition
  • [settings.xml] local configuration

I was just going back over the Maven build that I put together almost one year ago. At the time, I picked the official release, so we used Maven 1.x. I knew we’d have an upgrade down the road, and since I looked into some of the Maven 1 to Maven 2 changes, I wasn’t really looking forward to it. But I see they have managed to put everything together in such a way that you can have both versions available to build without conflicting. Brilliant! I wish everyone that was putting together major new releases, with major changes, did such a good job of taking the pain out of the process.

Now I can install the new Maven 2, and upgrade pieces and parts of our build as I go, when I have the time. And when I’m done, I can just switch the continuous builder over to Maven 2 and I’ll be done. I like it.

Filed Under: | Tags:

Comments

Have your say

A name is required. You may use HTML in your comments.