Filter dependencies with uninterpolated expressions from CollectRequest#12179
Closed
gnodet wants to merge 1 commit into
Closed
Filter dependencies with uninterpolated expressions from CollectRequest#12179gnodet wants to merge 1 commit into
gnodet wants to merge 1 commit into
Conversation
When building a CollectRequest for dependency collection, dependencies
and managed dependencies with uninterpolated ${...} property expressions
would cause MavenValidator to reject the entire request with "Invalid
Collect Request". This commonly happens with managed dependencies
imported from BOMs that define properties not resolvable in the
importing project's context.
The transitive path (DefaultArtifactDescriptorReader) already filtered
these, but the direct project paths did not. Apply the same filtering
in both DefaultProjectDependenciesResolver (Maven 3 compat) and
DefaultDependencyResolver (Maven 4 API), and also improve the error
enhancement to check managed dependencies.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
added a commit
that referenced
this pull request
May 28, 2026
…st (PR #12179) Cherry-pick from fix/null-dependency-collect-request branch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Claude Code on behalf of Guillaume Nodet Closing this PR. Investigation showed the original "Invalid Collect Request" failures were caused by uninterpolated repository expressions, not dependency expressions. Those were already fixed by #12050 and #12047. Uninterpolated managed dependencies are not a problem unless actually used, and BOM model building interpolates dependency properties correctly. |
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
${...}property expressions before passing them toCollectRequest, preventingMavenValidatorfrom rejecting the entire request with "Invalid Collect Request"DefaultProjectDependenciesResolver(Maven 3 compat path) andDefaultDependencyResolver(Maven 4 API path), consistent with whatDefaultArtifactDescriptorReaderalready does for transitive dependenciesDefaultDependencyResolver.enhanceCollectionError()to also check managed dependencies for unresolved expressionsTest plan
filterUninterpolated()covering placeholder in version/groupId/artifactId, valid deps pass-through, null and empty input,containsPlaceholderedge casesmaven-impltests pass (475 tests)maven-coretests pass (549 tests, 1 pre-existing skip)Claude Code on behalf of Guillaume Nodet
🤖 Generated with Claude Code