Skip to content

Move repository expression validation from raw to effective model#12175

Open
gnodet wants to merge 1 commit into
masterfrom
fix/uninterpolated-repo-expressions
Open

Move repository expression validation from raw to effective model#12175
gnodet wants to merge 1 commit into
masterfrom
fix/uninterpolated-repo-expressions

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented May 28, 2026

Summary

  • Skip uninterpolated expression checks for root-level repositories during raw model validation, because parent POM properties are not yet available at that stage
  • Add the same expression checks to effective model validation (validate20EffectiveRepository), where parent properties have been merged and full interpolation is complete
  • Truly unresolvable expressions are still caught as errors, but after all property sources have been resolved

Context

Raw model validation runs before the parent POM is read (doReadRawModelvalidateRawModel happens before readEffectiveModelreadParent). This means properties defined in parent POMs (e.g., ${eclipseP2RepoId}) are not available during raw validation, causing false positives.

Profile and distributionManagement repositories already skipped expression checks for the same reason. This change extends that to root-level repositories and pluginRepositories.

Fixes: MNG-15012, MNG-14390, MNG-10104, MNG-13299, MNG-14733

Test plan

  • Updated raw validation tests to reflect skipped expression checks
  • Added effective model validation tests to verify unresolvable expressions are still caught
  • All 470 maven-impl tests pass

Generated with Claude Code

Raw model validation checked for uninterpolated ${...} expressions in
repository IDs and URLs before parent POM properties were merged,
causing false positives for projects using parent-defined properties
(e.g. ${eclipseP2RepoId}).

Skip expression checks during raw validation for root-level
repositories (matching the existing behavior for profile and
distributionManagement repos) and instead validate in effective model
validation where all properties are fully resolved.

Co-Authored-By: Claude Opus 4.6 <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.

1 participant