Skip to content

Filter transitive repositories with uninterpolated IDs#12050

Merged
gnodet merged 1 commit into
masterfrom
fix-12049-uninterpolated-repo-id
May 18, 2026
Merged

Filter transitive repositories with uninterpolated IDs#12050
gnodet merged 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>
@gnodet gnodet requested a review from cstamas May 17, 2026 19:14
@gnodet gnodet merged commit 9332ad3 into master May 18, 2026
24 checks passed
@gnodet gnodet deleted the fix-12049-uninterpolated-repo-id branch May 18, 2026 05:49
@github-actions
Copy link
Copy Markdown

@gnodet Please assign appropriate label to PR according to the type of change.

@github-actions github-actions Bot added this to the 4.1.0 milestone May 18, 2026
gnodet added a commit that referenced this pull request May 19, 2026
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>
gnodet added a commit that referenced this pull request May 19, 2026
…) (#12070)

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

2 participants