You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/09/01 06:18:20 UTC

[PR] Fix consumer POM leaving extension-contributed user properties uninterpolated [maven]

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

   ## Summary
   
   Fixes #12981
   
   - When a Maven extension contributes user properties via the `PropertyContributor` SPI (e.g. Nisse's `nisse.jgit.dynamicVersion`), `buildPom()` used the raw model (uninterpolated) for the consumer POM
   - Since these properties are not in any POM's `<properties>` section or parent chain, they remained as dangling `${...}` references in the installed/deployed POM
   - Fix: interpolate version references in `<dependencyManagement>` and `<dependencies>` using the effective model's resolved values, similar to how `buildBom()` already uses the effective model
   - Reported via [maveniverse/nisse#208](https://github.com/maveniverse/nisse/issues/208)
   
   ## Test plan
   
   - [x] 5 new unit tests for `interpolatePomVersions()` covering:
     - Dependency management version interpolation
     - Direct dependency version interpolation
     - Already-resolved versions left unchanged
     - Mixed resolved/unresolved dependencies
     - Empty model handling
   - [x] All 30 `ConsumerPomBuilderTest` tests pass
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix consumer POM leaving extension-contributed user properties uninterpolated [maven]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #12982:
URL: https://github.com/apache/maven/pull/12982#issuecomment-5512158600

   Both review observations addressed in 09267a3:
   
   1. **Profile-level dependencies**: `interpolatePomVersions` now iterates over `rawModel.getProfiles()` and applies the same extension-property interpolation to each profile's dependencies and dependency management.\n\n2. **`isBuiltInProperty` scope**: Added `env.*` and `settings.*` recognition, with javadoc documenting the full set of recognized prefixes.\n\n3 new tests added (40 total, all passing).


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix consumer POM leaving extension-contributed user properties uninterpolated [maven]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #12982:
URL: https://github.com/apache/maven/pull/12982


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org