A lifecycle-mapping-metadata.xml shipped with a Maven plugin like https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml is considered no matter to which phase the configured goal is bound, e.g.:
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<goals>
<goal>apply</goal>
<goal>check</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>true</runOnIncremental>
<runOnConfiguration>false</runOnConfiguration>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
would execute goal apply even if bound to phase verify in the POM.xml (which is usually not relevant for incremental builds).
As the default execution of maven plugins introduced in https://github.com/eclipse-m2e/m2e-core/blob/main/RELEASE_NOTES.md#mojos-without-a-mapping-are-now-executed-by-default-in-incremental-builds only ever execute by default up to phase process-test-classes the same should be replicated for plugins carrying an explicit mapping for consistency reasons.

A lifecycle-mapping-metadata.xml shipped with a Maven plugin like https://github.com/diffplug/spotless/blob/main/plugin-maven/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml is considered no matter to which phase the configured goal is bound, e.g.:
would execute goal
applyeven if bound to phaseverifyin the POM.xml (which is usually not relevant for incremental builds).As the default execution of maven plugins introduced in https://github.com/eclipse-m2e/m2e-core/blob/main/RELEASE_NOTES.md#mojos-without-a-mapping-are-now-executed-by-default-in-incremental-builds only ever execute by default up to phase
process-test-classesthe same should be replicated for plugins carrying an explicit mapping for consistency reasons.