Fix #11920: skip expression validation for profile repository URLs#12047
Conversation
Profile properties are injected after raw model validation, so expressions in profile repository URLs/IDs cannot be validated at this stage. Skip the uninterpolated expression check for repositories inside profiles to allow deferred property interpolation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
do we know where/when/why the change was introduced? |
|
seems it was part of #11140 backported to / introduced in 4.0.0-rc5
in Maven 3.x, there was no report, but was there interpolation? or just silent raw un-interpolated value? |
|
The uninterpolated expression validation was introduced in #11140 (commit 210dbdc, Oct 2025), backported to 4.0.x via #11210 — which landed in rc-5. The goal was to allow repository URL interpolation during model building and validate that all expressions are resolved afterward. The problem is that this validation runs at the raw model stage ( Regarding the Maven 3.x question: in Maven 3.x, there was no validation for uninterpolated expressions in repository URLs at all. The raw expressions were silently carried through. When a profile was activated, its properties got merged into the model during profile injection, and full model interpolation resolved them afterward. When a profile was NOT active, its repository definitions simply weren't included in the effective model, so the unresolved expressions were harmless. The interpolation always happened — just later in the pipeline, after profile activation. Claude Code on behalf of Guillaume Nodet |
|
@gnodet Please assign appropriate label to PR according to the type of change. |
Summary
${asf.staging}or${env.MAVEN_MIRROR_URL}defined in profile properties/activation cannot be resolved at this stageTest plan
profile-with-property-in-repository-url.xmlreproducing the Spark POM pattern (env var in profile repo URL + profile properties in plugin repo URLs)profileWithPropertyInRepositoryUrlverifying no validation errorsCloses #11920
🤖 Generated with Claude Code
Claude Code on behalf of Guillaume Nodet