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

   Fixes #7476.
   
   `DefaultInheritanceAssembler.mergePluginContainer_Plugins()` decided whether 
a parent build plugin participates in inheritance with `element.isInherited() 
|| !element.getExecutions().isEmpty()`, so any parent plugin declaring at least 
one execution was folded into the child's effective plugin set regardless of an 
explicit `inherited=false` -- exactly the kind of plugin declaration for which 
that flag matters most in practice.
   
   Same fix as #13952 (maven-3.10.x), forward-ported to master's two copies of 
this class: the compat layer (`compat/maven-model-builder`) and the Maven 4 
impl layer (`impl/maven-impl`). Only commit a plugin to the inherited set once 
we know whether any of its executions actually survived the per-execution 
inherited filtering -- if none did, the plugin itself must not be inherited 
either (MNG-6373); if at least one did, the whole plugin must still flow 
through (MNG-2103's documented execution-level override).
   
   Verified both modules with a real build: the new regression test fails on 
the unpatched code and passes with the fix, reproduced via stash-based 
revert-test-restore on each module separately. Full 
`compat/maven-model-builder` and `impl/maven-impl` test suites plus spotless 
pass locally.
   
   To make clear that you license your contribution under the Apache License 
Version 2.0, January 2004, check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the Apache 
License Version 2.0, January 2004
   - [ ] I hereby declare that I have filed an Apache Individual Contributor 
License Agreement.


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