gnodet opened a new pull request, #12322:
URL: https://github.com/apache/maven/pull/12322

   ## Summary
   
   - Fix dead-code bug in `DefaultModelBuilder.doReadFileModel()` where the 
CI-friendly version interpolation for non-build requests (dependency/parent POM 
reads) was guarded by `else if (modelSource.getPath() != null)`. Since 
`ResolvedPathSource.getPath()` always returns `null`, the `${revision}` 
replacement never executed.
   - Changed to `else { if (modelSource.getPath() != null) { ... } }` so the 
`getEnhancedProperties()` and `replaceCiFriendlyVersion()` calls always run for 
non-build requests.
   - Updated IT to exercise the fix with a pre-installed dependency (`ci-lib`) 
whose parent POM uses `${revision}` in its version.
   
   Fixes #12303
   
   ## Test plan
   
   - [ ] IT `MavenITgh12303CIFriendlyRevisionRemoteResourcesTest` passes 
(resolves `ci-lib-parent:${revision}` → `ci-lib-parent:1.0`)
   - [ ] Existing CI-friendly version tests still pass
   - [ ] No regressions in model builder behavior for build requests
   
   _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]

Reply via email to