What's Changed?

Maven 2.0 & 3.0 will feel very different to a Maven 1.0 user - and perhaps a little strange. But it is a lot simpler to work with and closer to how Maven was always meant to be! The key changes from Maven 1.0 are:

  • Faster and smaller - The Maven core no longer uses Ant, Jelly or Xerces making it much smaller, has fewer dependencies, and is perfect for embedding in other tools.
  • Defined build lifecycle - No more prereqs, preGoals and postGoals. The build is a series of well defined phases. This also means that the normal goal names are not used - compile, test and install work for any project type.
  • Built-in multiple project handling - Use the same goals on a set of projects, and aggregate the results.
  • Improved SNAPSHOT handling - Snapshots are now checked for updates only once per day by default - though can be configured to be once per build, on a particular interval, or never. A command line option can force a check - making it more like updating from an SCM.
  • No more properties files - All plugins are now configured from the POM (which is now called pom.xml).
  • No more maven.xml - Plugins are now easier to build and integrate, and are the only way to script your builds. (Note that additions may later be made to the POM to allow simple things that scripting was used for, such as goal aliasing).
  • No more Jelly - Plugins are primarily written in Java, though there are providers for other scripting languages.
  • Improved repository layout - Maven 2.0 supports both the existing layout (not Maven 3), and an improved repository layout that has deeper, partitioned structure making it easier to browse.


Should I use Maven 2.x, Maven 3.x, or Maven 1.0?

Maven 3.x is the latest stable release, and we certainly recommend it for all new projects.

If you are already using Maven 1.0 - you should try out Maven 3.x, as it is very much improved. However, we still continue to support the Maven 1.x releases at this time.

If you do use Maven 1.0, and would like to upgrade in the future, you should carefully consider following some of the Best Practices listed. These will make your project a lot easier to migrate in the future.

The following are the known limitations in the current Maven 2.x release compared to Maven 1.x: none.

The following are the known limitations in the current Maven 3.x release compared to Maven 1.x:

  • Maven 1 repository layout is not supported


What will happen to Maven 1.0?

Support for Maven 1.0.2 has been discontinued with the release of Maven 1.1. While significant new features will not be added to the Maven 1.x core (such as transitive dependencies), bugfixes and support continue and the repository is still available.


Will my Maven 1.0 plugins be supported?

Not directly.

We recommend building your Jelly plugins as thin wrappers around Java beans that do not use Maven 1.0 API's, which will allow easy migration to Maven 2.0.


How do I write custom scripts without a maven.xml file?

Taken from this post to the Maven User's List:

Everything in m2 is a plugin so for doing any sort of custom work like that you will need to make a plugin. This 1) greatly reduces the complexity within m2 because we only deal with proper plugins. The maven.xml file in m1 was a pseudo plugin essentially and greatly complicated the internals and 2) it promotes the sharing of your work right from the get go. To start with you'll probably write a plugin that is only applicable to your specific requirements, or your team's work, but you'll see people asking for some functionality and you'll go "hey, I have something like that!" and hopefully people who have concrete solutions will generalize their solutions so they can be shared with others. That's what we're trying to encourage.
We estimate that there's a lot of work bound up in project's maven.xml that is not being shared and we'd like to try and change that. We plan to make it dead simple to share plugins and hopefully people can use other project's plugins as a start for a plugin that they may need themselves.


How do I convert from Maven 1.x to Maven 2.x or 3.x?
This is discussed in Guide to Moving from Maven 1.x to Maven 2.x (Maven 3.x is mostly equivalent to Maven 2.x).