Main differences between Maven 3 and 4 - Stack Overflow

admin2025-04-17  3

Now that there is release candidate 2 of Maven 4.0.0 and things become more stable, I would like to know:

What are the main differences between Maven 3.x and 4.0.0 for Maven users (and Maven plugin developers)?

I tried to have a look at release notes and the Maven homepage, but I am a bit overwhelmed. A lot information is about the internal structure of Maven, and there is a huge number of issues in the issue tracker that are resolved, but I did find any good information that summarizes the main improvements and breaking changes.

Now that there is release candidate 2 of Maven 4.0.0 and things become more stable, I would like to know:

What are the main differences between Maven 3.x and 4.0.0 for Maven users (and Maven plugin developers)?

I tried to have a look at release notes and the Maven homepage, but I am a bit overwhelmed. A lot information is about the internal structure of Maven, and there is a huge number of issues in the issue tracker that are resolved, but I did find any good information that summarizes the main improvements and breaking changes.

Share Improve this question asked Jan 31 at 16:09 J Fabian MeierJ Fabian Meier 36.1k11 gold badges85 silver badges170 bronze badges 4
  • At the moment there are some PR open to do some documentation github.com/apache/maven-site/pull/598 for example... not ready yet... – khmarbaise Commented Jan 31 at 17:09
  • @khmarbaise But maybe you could give a short summary? – J Fabian Meier Commented Feb 1 at 9:16
  • 1 This presentation (shared in maven dev mailing list) has some high level information gnodet.github.io/maven4-presentation – Raghuram Commented Feb 2 at 16:12
  • 1 maven.apache.org/whatsnewinmaven4.html – khmarbaise Commented Mar 3 at 19:05
Add a comment  | 

1 Answer 1

Reset to default 1

Main points are:

  1. Separation of build POM and consumer POM. The build POM gets a new model version, while the consumer POM, generated during the build, still uses 4.0.0
  2. Better handling of modules (now called subprojects), less duplication of version numbers.
  3. A new packaging type bom for Bills of Materials.
  4. Improved lifecycle which allows to handle things happening before and after certain phases.
  5. A Maven shell that allows faster execution of Maven commands.

See also https://maven.apache.org/whatsnewinmaven4.html, thanks to Karl-Heinz Marbaise for the link.

转载请注明原文地址:http://anycun.com/QandA/1744858984a88621.html