Hiteshsai007 commented on issue #10196:
URL: https://github.com/apache/maven/issues/10196#issuecomment-4877207400
I have opened a PR to address this issue.
**Implementation Details:**
Currently, when importing a BOM, the `DefaultModelBuilder` only extracts the
`DependencyManagement` and ignores the model's `<properties>`. Furthermore, BOM
imports happen *after* the initial model interpolation phase, which prevents
BOM properties from resolving placeholders like
`<version>${lib.version}</version>`.
To solve this, I've updated `DefaultModelBuilder` to:
1. Load the full `Model` for the imported BOM.
2. Extract the BOM's properties and merge them into the consuming model
(with existing properties taking precedence to prevent unwanted overrides).
3. Execute a second pass of `interpolateModel` immediately after importing
the properties, allowing the newly merged BOM properties to resolve any
outstanding property placeholders in the model.
I have tested this end-to-end with a reproducer and all tests pass. Looking
forward to any feedback on the PR!
--
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]