[#12303] Fix CI-friendly ${revision} not interpolated for non-build POM reads#12352
Open
gnodet wants to merge 2 commits into
Open
[#12303] Fix CI-friendly ${revision} not interpolated for non-build POM reads#12352gnodet wants to merge 2 commits into
gnodet wants to merge 2 commits into
Conversation
…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>
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>
244a03a to
ad5c02d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port of #12322 to
master.DefaultModelBuilder.doReadFileModel(), CI-friendly version interpolation (${revision},${sha1},${changelist}) was only performed inside theisBuildRequest()blockmaven-remote-resources-pluginresolve the project's own POM through the non-build code path,${revision}was left uninterpolated, causingInvalid Version Range Requesterrorselsebranch that performs CI-friendly version interpolation for non-build requests as wellFixes #12303
Test plan
MavenITgh12303CIFriendlyRevisionRemoteResourcesTestaddedFully automatic review from Claude Code