gnodet opened a new pull request, #14003:
URL: https://github.com/apache/maven/pull/14003
Backport of #13952 and its master forward-port (846c3eaebd) to `maven-4.0.x`.
`DefaultInheritanceAssembler.mergePluginContainer_Plugins()` decided whether
a
parent build plugin participates in inheritance with:
```java
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</inherited>`.
## Fix
Only commit the merged 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).
## Changes
Applied to **both** copies of `DefaultInheritanceAssembler` on `maven-4.0.x`:
- `compat/maven-model-builder` (Maven 3 compat layer)
- `impl/maven-impl` (Maven 4 impl layer — shares test resources via relative
path)
Both test classes extended with `testPluginNotInherited` and
`testPluginNotInheritedWithInheritedExecutionOverride`.
Fixes #7476.
<!-- 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]