gnodet commented on PR #12047: URL: https://github.com/apache/maven/pull/12047#issuecomment-4453789546
The uninterpolated expression validation was introduced in #11140 (commit 210dbdcb7e, 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 (`validateRawModel`), where profile properties haven't been injected yet. For top-level repositories, the interpolation in `readFileModel()` resolves expressions using `getEnhancedProperties()` (which includes active profile properties). But for repositories inside inactive profiles — like `maven-mirror` activated by `env.MAVEN_MIRROR_URL`, or `snapshots-and-staging` requiring explicit `-P` activation — the profile properties aren't in scope, so expressions remain unresolved and the validator flags them as errors. 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_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
