[MNG-8450] Report BOM import warnings only at declaration sites (4.0.x backport) - #13003
Merged
Merged
Conversation
* [MNG-8450] Report BOM import warnings only at declaration sites Signed-off-by: goutamadwant <workwithgoutam@gmail.com> * [MNG-8450] Handle import warnings without source locations Signed-off-by: goutamadwant <workwithgoutam@gmail.com> * [MNG-8450] Address review feedback: polish deduplication code - Import java.util.stream.Collectors instead of using fully-qualified references - Add Javadoc on ImportWarningKey record explaining its deduplication role - Document dual-key rationale in registerReactorProblemCollector - Extract anonymous ModelProblemCollector to named DeduplicatingImportProblemCollector inner class Signed-off-by: Guillaume Nodet <gnodet@gmail.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Signed-off-by: goutamadwant <workwithgoutam@gmail.com> Signed-off-by: Guillaume Nodet <gnodet@gmail.com> Co-authored-by: Guillaume Nodet <gnodet@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
force-pushed
the
backport/12959-to-maven-4.0.x
branch
from
September 1, 2026 15:10
166d83b to
8eae5c6
Compare
gnodet
commented
Sep 1, 2026
gnodet
left a comment
Contributor
Author
There was a problem hiding this comment.
Clean, faithful cherry-pick of #12959 to maven-4.0.x. No issues found.
Cherry-pick verification:
- All production code changes in
DefaultModelBuilder.javaandDefaultDependencyManagementImporter.javamatch the master commit (625d69d92a) exactly. - Import conflict resolution is correct: master-only imports (
Spliterator,CountDownLatch,ExecutorService, etc.) correctly omitted;Constantsimport correctly added for the test. - All 15 test fixture POM files and 3 test methods are identical to master.
Polish from master review addressed: All four non-blocking suggestions from the #12959 review were incorporated:
- ✅
Collectorsproperly imported (no longer fully-qualified) - ✅
ImportWarningKeyhas Javadoc - ✅
registerReactorProblemCollectorhas dual-key rationale comment - ✅ Anonymous collector extracted to named
DeduplicatingImportProblemCollectorinner class
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of Guillaume Nodet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of #12959 to
maven-4.0.x(squash-merged to master as 625d69d).Report conflicting BOM import warnings once at the model that declares the imports instead of repeating them for every inheriting child.
Cherry-pick details
Single squash commit cherry-picked from
masterwith conflict resolution:Spliterator,CountDownLatch,ExecutorService,Executors,Future,TimeUnit,ModelSource) not needed on 4.0.xConstantsimport (already available in 4.0.x, referenced by test)Test plan
DefaultModelBuilderTest— 24 tests passed (including 3 new MNG-8450 tests)maven-4.0.xbase🤖 Generated with Claude Code