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

   Backport of #14032 to `maven-4.0.x`.
   
   When a recessive child matches a dominant child through `combine.id` or 
`combine.keys`, `DefaultXmlService.doMerge` was merging it into the next 
dominant sibling with the same element name rather than into the matching one, 
so inherited configuration landed in the wrong element. The merged node could 
also replace the wrong sibling once recessive children had been added before it 
(`combine.children=append`), and a second recessive child with the same id was 
dropped.
   
   This fix computes the id/keys matches upfront and merges each recessive 
child into its matching dominant child directly (wherever it is among its 
siblings), rather than treating matched children as ordinary name-based 
siblings.
   
   Cherry-picked from aabb958b67e0d50b6248770a5b045723e69cdf4f with a minor 
conflict resolution in the `commonChildren.computeIfAbsent` formatting (4.0.x 
has a slightly different style than master; the logic is identical).
   
   <!-- maven-backport-bot -->


-- 
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