Skip to content

[maven-4.0.x] Filter transitive dependencies with uninterpolated expressions#12097

Open
gnodet wants to merge 2 commits into
maven-4.0.xfrom
backport-12084-to-4.0.x
Open

[maven-4.0.x] Filter transitive dependencies with uninterpolated expressions#12097
gnodet wants to merge 2 commits into
maven-4.0.xfrom
backport-12084-to-4.0.x

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented May 19, 2026

Backport of #12084 to maven-4.0.x.

Filters out transitive dependencies that contain uninterpolated ${...} expressions in their coordinates, preventing build failures caused by unresolved property references in transitive dependency POMs.

Claude Code on behalf of Guillaume Nodet

gnodet and others added 2 commits May 19, 2026 12:02
When a transitive dependency POM contains dependencies with
uninterpolated property expressions (e.g., ${osgi.version}), the
MavenValidator.validateDependency() throws IllegalArgumentException
during dependency collection.

Filter out such dependencies in DefaultArtifactDescriptorReader after
populateResult() runs, before they reach the resolver/validator,
following the same pattern used for transitive repositories with
uninterpolated IDs/URLs (commit 9332ad3).

This is safe because invalid dependencies from build POMs have already
been rejected during model validation. Uninterpolated expressions in
transitive dependency POMs indicate undefined properties in those
third-party POMs that cannot be resolved.

Cherry-pick of #12084, adapted for the 4.0.x delegate pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extend the uninterpolated expression filtering to also cover
repositories from transitive dependency POMs. This prevents
build failures when a transitive dependency defines a repository
with a property expression (e.g., ${eclipseP2RepoId}) as its ID
that is only available in the original project context.

Cherry-picked and adapted from PR #12088 for the 4.0.x branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet added this to the 4.0.0-rc-6 milestone May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant