[MNG-8765] Maven Upgrade Tool (#2407) ## Maven Upgrade Tool (mvnup) - New `mvnup` command-line tool with check/apply workflow - Automatic POM discovery and multi-module project support - Model version upgrades from 4.0.0 to 4.1.0 with namespace updates - Intelligent inference to remove redundant information in Maven 4.1.0+ models - Comprehensive plugin compatibility upgrades for Maven 4 ### Plugin Compatibility & Upgrades - Automatic plugin version upgrades for Maven 4 compatibility: * `maven-exec-plugin` → 3.2.0+ * `maven-enforcer-plugin` → 3.0.0+ * `flatten-maven-plugin` → 1.2.7+ * `maven-shade-plugin` → 3.5.0+ * `maven-remote-resources-plugin` → 3.0.0+ - Parent POM plugin detection with proper XML formatting - Plugin management section creation with correct element ordering - Property-based version management support ### Maven 4 Compatibility Fixes - Fix unsupported `combine.children` attributes (`override` → `merge`) - Fix unsupported `combine.self` attributes (`append` → `merge`) - Remove duplicate dependencies in `dependencyManagement` sections - Remove duplicate plugins in `pluginManagement` sections - Comment out repositories with unsupported expressions - Fix incorrect `parent.relativePath` pointing to non-existent POMs - Create `.mvn` directory when not upgrading to 4.1.0 to avoid warnings ### Intelligent Model Inference - Parent element trimming when parent is in same project - Managed dependency removal for project artifacts - Redundant subprojects list removal when matching direct children - GroupId/version inference from parent when using relativePath - Dependency inference that reverses Maven's resolution logic ### Advanced XML Processing - Intelligent indentation detection supporting 2/4 spaces and tabs - Document-wide formatting consistency preservation - Proper element ordering following Maven POM schema standards - pluginManagement placement before plugins sections - Comprehensive JDOM-based XML manipulation with formatting preservation
Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.
If you think you have found a bug, please file an issue in the Maven Issue Tracker.
More information can be found on Apache Maven Homepage. Questions related to the usage of Maven should be posted on the Maven User List.
You can download the release source from our download page.
If you are interested in the development of Maven, please consult the documentation first and afterward you are welcome to join the developers mailing list to ask questions or discuss new ideas/features/bugs etc.
Take a look into the contribution guidelines.
This code is under the Apache License, Version 2.0, January 2004.
See the NOTICE file for required notices and attributions.
Do you like Apache Maven? Then donate back to the ASF to support the development.
If you want to bootstrap Maven, you'll need:
mvn -DdistributionTargetDir="$HOME/app/maven/apache-maven-4.0.x-SNAPSHOT" clean package