Maven 4 incoming
Saw this recent post on bluesky at thought that I should take a look at what's coming down the pipe - https://maven.apache.org/whatsnewinmaven4.html
My key takeaways are below:
⬆️ Java 17 Requirement:
You'll need at least Java 17 to run Maven 4. Time to upgrade if you haven't already! It will still compile against older Java versions ☕
🚀 Modules are subprojects:
Maven is dropping the module naming to avoid clashing with Java modules. What was modules will now be subprojects 💨
⚙ bom package type:
Bill of materials packaging type introduced to help with those dependency managing types like Spring Boot 🌿
✨ Automatic Versioning of subprojects:
(My Fav :hearting:) No more need to declare the parent POM version in subprojects (nee modules)! 🛠️
📦 CI-friendly Variables:
Built in support for ${revision}
variables in your POM versions! This reduces a lot of pain in CI environments 💪
🔗 Pre- and post-phases:
Every lifecycle page will have a before
and after
phase to bind plugins to. Very helpful for setting up test data and source generation tooling 🔥
⚠ Old maven plugins:
As with any major version change there will be some compatibility issues with older, less well maintained plugins. Hopefully the authors will be able to update their plugins or alternatives will need to be found!
😉 Happy building! 🏗️