Skip to content

[#12303] Fix CI-friendly ${revision} not interpolated for non-build POM reads#12352

Open
gnodet wants to merge 2 commits into
masterfrom
port/gh-12303-fix-master
Open

[#12303] Fix CI-friendly ${revision} not interpolated for non-build POM reads#12352
gnodet wants to merge 2 commits into
masterfrom
port/gh-12303-fix-master

Conversation

@gnodet

@gnodet gnodet commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Port of #12322 to master.

  • In DefaultModelBuilder.doReadFileModel(), CI-friendly version interpolation (${revision}, ${sha1}, ${changelist}) was only performed inside the isBuildRequest() block
  • When plugins like maven-remote-resources-plugin resolve the project's own POM through the non-build code path, ${revision} was left uninterpolated, causing Invalid Version Range Request errors
  • Added an else branch that performs CI-friendly version interpolation for non-build requests as well

Fixes #12303

Test plan

  • IT MavenITgh12303CIFriendlyRevisionRemoteResourcesTest added
  • Existing CI-friendly version tests still pass
  • No regressions in model builder behavior for build requests

Fully automatic review from Claude Code

…OM reads

Port of #12322 to master.

In doReadFileModel(), the CI-friendly version interpolation was only
performed inside the isBuildRequest() block. When plugins like
maven-remote-resources-plugin resolve the project's own POM through
the non-build code path, ${revision} was left uninterpolated, causing
"Invalid Version Range Request" errors.

Add an else branch that performs CI-friendly version interpolation
for non-build requests as well.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet added the bug Something isn't working label Jun 23, 2026
@gnodet gnodet added this to the 4.1.0 milestone Jun 23, 2026
The IT was copied from maven-4.0.x but master's
AbstractMavenIntegrationTestCase was migrated to NIO2 (no version
range constructor, extractResources returns Path).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet force-pushed the port/gh-12303-fix-master branch from 244a03a to ad5c02d Compare June 24, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI-friendly ${revision} not interpolated when used by maven-remote-resources-plugin

1 participant