Add maven4-build-vs-consumer-pom: Maven 4.0.0-rc-7 build POM vs consumer POM, lifecycle hooks, mvnup, mvnd

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b4XrpfdpsacrvqnrBM
This commit is contained in:
Ankur Mhatre
2026-11-26 21:03:12 +05:30
co-authored by Claude Sonnet 5.5
commit f32c088174
38 changed files with 1491 additions and 0 deletions
@@ -0,0 +1,18 @@
$ mvn package (Maven 3.9.16, same POM)
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Malformed POM <module>/lifecycle/pom.xml: Unknown attribute 'root' for tag 'project' (position: START_TAG seen ...->\n<project xmlns="http://maven.apache.org/POM/4.1.0" root="true">... @3:64) @ <module>/lifecycle/pom.xml, line 3, column 64
[FATAL] 'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 4, column 17
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.ankurm.m4:lifecycle-demo:1.0.0 (<module>/lifecycle/pom.xml) has 2 errors
[ERROR] Malformed POM <module>/lifecycle/pom.xml: Unknown attribute 'root' for tag 'project' (position: START_TAG seen ...->\n<project xmlns="http://maven.apache.org/POM/4.1.0" root="true">... @3:64) @ <module>/lifecycle/pom.xml, line 3, column 64 -> [Help 2]
[ERROR] 'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 4, column 17
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException