Backport #13040: treat reactor BOM imports as ProjectSorter edges so -am includes them - #13263
Conversation
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review of 530e539.
The -amd test added in this commit is a useful addition. However, the finding raised in the previous review — missing test for the generic property resolution branch — is not addressed by this commit. Both existing tests use ${project.version}, which exercises only the fast-path in resolveImportVersion. See inline comment.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review of 6631d67.
Previous finding addressed. The importedReactorBomWithPropertyVersion() test (added in this commit) covers the generic property resolution branch of resolveImportVersion — the path I flagged as missing in the prior review.
Backport is faithful to master: resolveImportVersion is identical, the logic for iterating originalModel.getDependencyManagement() is correct, and the Maven 3 API adaptation (project.getModel().getParent() without .getDelegate()) is properly applied. Test coverage now includes all three cases: -am direction with ${project.version} fast-path, -am direction with generic property resolution, and -amd direction.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
…s ProjectSorter edges so -am includes them - Register dependencyManagement BOM imports (scope=import, type=pom) as reactor graph edges in ProjectSorter - Ensures -am / -amd correctly includes imported BOM modules in the selected reactor subset - Fix Java 8 compatibility: replace List.of() with Arrays.asList() - Add test coverage for -amd direction (BOM reports consumer as dependent) and arbitrary property versions
6631d67 to
89ad1a3
Compare
Backport of #13040 to
maven-3.10.x.Treat
dependencyManagementBOM imports (scope=import, type=pom) from the original project model as reactor graph edges inProjectSorter, so that-am/-amdcorrectly includes imported BOM modules in the selected reactor subset.The bug was reported against Maven 3.9.11 (#11397). The
ProjectSortercode lives inmaven-core/on this branch (Maven 3 API:project.getModel().getParent()without.getDelegate()). The conflict from cherry-pick was resolved accordingly — the logic is otherwise identical to themasterfix.Fixes: #11397