Skip to content

Filter transitive repositories with uninterpolated IDs#12050

Open
gnodet wants to merge 1 commit into
masterfrom
fix-12049-uninterpolated-repo-id
Open

Filter transitive repositories with uninterpolated IDs#12050
gnodet wants to merge 1 commit into
masterfrom
fix-12049-uninterpolated-repo-id

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented May 13, 2026

Summary

  • Extend the transitive repository filter in mergeRepositories to also exclude repositories whose ID contains uninterpolated expressions (${...}), not just URLs
  • Add test coverage for repositories with uninterpolated IDs but valid URLs

Fixes #12049

Context

The existing filter (added in #11357) already excluded transitive repositories with uninterpolated URLs. However, when a transitive dependency POM contained an expression like ${eclipseP2RepoId} as a repository ID with a valid URL, it passed the filter and later caused MavenValidator.validateRemoteRepository to throw IllegalArgumentException, failing the build.

The consuming project has no control over third-party POM content, so these invalid repositories should be silently skipped (they can't be useful in the consuming project's context anyway).

Test plan

  • Extended testMergeRepositories to verify repositories with uninterpolated IDs are filtered
  • CI passes

Claude Code on behalf of Guillaume Nodet

The existing filter in mergeRepositories already excluded transitive
repositories with uninterpolated URLs but did not check repository IDs.
When a transitive dependency POM contained an expression like
${eclipseP2RepoId} as a repository ID with a valid URL, it passed the
filter and later caused MavenValidator to throw IllegalArgumentException.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Maven 4 rejects builds when transitive dependency POMs contain uninterpolated repository expressions

1 participant