Conversation
Collect and filter parent POMs separately so classifier and type translation only applies to dependencies. Preserve explicit classified POMs, including artifacts that are also used as parents, and document the parameter interaction. Fixes apache#1312.
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.
With
copy-dependencies, combiningaddParentPoms=trueandclassifier=sourcesattempts to resolve parent POMs as*-sources.pom. Those missing artifacts are silently omitted by default, or fail the build whenfailOnMissingClassifierArtifact=true.Keep automatically added parent POMs separate from dependencies during classifier/type translation, while retaining inclusion/exclusion filters and overwrite handling. Explicit classified POM dependencies still work, including a POM that is also used as a parent. Clarify this interaction in the parameter documentation.
Fixes #1312 (MDEP-803).
Tests
The first commit adds an Invoker regression, verified failing on the missing project and dependency parent POMs before the second commit applies the fix. It covers parent ancestry, a parent also declared as a dependency, explicit classified POMs, a type override, exclusions, and repository layout.
Validated with Maven 3.9.16 and Java 21:
mvn spotless:apply— clean.mvn -Prun-its clean install— 435 unit tests, no failures/errors, 1 existing skip; all 103 integration tests passed.Checklist
mvn verify— included in the successful clean install lifecycle.-Prun-its.