Ignore all mojo executions outside interesting phases - #2194
Conversation
|
Still requires adjusting some tests. |
Test Results 345 files ±0 345 suites ±0 1h 11m 3s ⏱️ + 6m 53s For more details on these failures, see this check. Results for commit 153b095. ± Comparison against base commit 25b65b0. ♻️ This comment has been updated with latest results. |
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
|
I'm not completely sure this is right to skip just all executions that are "not interesting" here... Especially if tests needs adjustments it more seems that this behavior is actually intended here. |
|
There is no possibility for plugin specific lifecycles to filter for phases. I would argue that Eclipse should only try to replicate up to phase process-test-resources because other executions should only be performed on demand. The phase is determined by the consuming POM for good reasons and this should be considered. |
This heavily depends on the use-case, e.g. many downstream mojos require at best I would suggest to first provide a test that shows what actually is the faulty behavior so we have one failing test. The we might add code to fix this one problem (if we agree it actually is one) and it should not break existing test unless they are clearly fall into the same category. For cases where one just want to skip one execution there are already ways for the user to do so. |
|
Often mojos are not bound by default (via package lifecycle) but only via explicit execution. Also not all Mojos have a default phase. |
I tried with syntax https://eclipse.dev/m2e/documentation/release-notes-17.html#new-syntax-for-specifying-lifecycle-mapping-metadata and also via https://eclipse.dev/m2e/documentation/m2e-execution-not-covered.html#ignore-plugin-goal. Neither did overwrite the explicit plugin configuration from https://github.com/diffplug/spotless/blob/58e96f324e712d536c9c6a9622a5a9ddd7788c19/plugin-maven/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml#L26 |
Than you should add a testcase for this so we can fix that instead first. Actually I would expect that this takes precedence over whatever is supplied elsewhere. |
This closes #2193