Skip to content

Ignore all mojo executions outside interesting phases - #2194

Draft
kwin wants to merge 2 commits into
mainfrom
feature/filter-mojo-executions-for-phases
Draft

Ignore all mojo executions outside interesting phases#2194
kwin wants to merge 2 commits into
mainfrom
feature/filter-mojo-executions-for-phases

Conversation

@kwin

@kwin kwin commented Jun 18, 2026

Copy link
Copy Markdown
Member

This closes #2193

@kwin

kwin commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

Still requires adjusting some tests.

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

Test Results

  345 files  ±0    345 suites  ±0   1h 11m 3s ⏱️ + 6m 53s
  727 tests ±0    691 ✅  - 18  16 💤 ±0  20 ❌ +18 
2 181 runs  ±0  2 077 ✅  - 54  48 💤 ±0  56 ❌ +54 

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.

@eclipse-m2e-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
org.eclipse.m2e.core/META-INF/MANIFEST.MF
org.eclipse.m2e.feature/feature.xml

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 patch
From 83dda7aa57189fbc932fa11f52f3c51b0e0dfc3f Mon Sep 17 00:00:00 2001
From: Eclipse M2E Bot <m2e-bot@eclipse.org>
Date: Thu, 18 Jun 2026 13:53:09 +0000
Subject: [PATCH] Version bump(s) for null object or invalid expression stream


diff --git a/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF b/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
index 0ca7c3ac..694bf69c 100644
--- a/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.core.ui/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.m2e.core.ui;singleton:=true
-Bundle-Version: 2.4.201.qualifier
+Bundle-Version: 2.4.301.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-21
 Bundle-Name: %Bundle-Name
 Bundle-Vendor: %Bundle-Vendor
diff --git a/org.eclipse.m2e.core/META-INF/MANIFEST.MF b/org.eclipse.m2e.core/META-INF/MANIFEST.MF
index 2a878687..315251b8 100644
--- a/org.eclipse.m2e.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.eclipse.m2e.core;singleton:=true
-Bundle-Version: 2.7.800.qualifier
+Bundle-Version: 2.7.900.qualifier
 Bundle-Activator: org.eclipse.m2e.core.internal.MavenPluginActivator
 Bundle-Vendor: %Bundle-Vendor
 Bundle-Localization: plugin
diff --git a/org.eclipse.m2e.feature/feature.xml b/org.eclipse.m2e.feature/feature.xml
index 01ffa2a8..656556e1 100644
--- a/org.eclipse.m2e.feature/feature.xml
+++ b/org.eclipse.m2e.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.m2e.feature"
       label="%featureName"
-      version="2.10.200.qualifier"
+      version="2.10.300.qualifier"
       provider-name="%providerName"
       plugin="org.eclipse.m2e.core"
       license-feature="org.eclipse.license"
-- 
2.54.0

Further information are available in Common Build Issues - Missing version increments.

@laeubi

laeubi commented Jun 18, 2026

Copy link
Copy Markdown
Member

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.

@kwin

kwin commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

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.

@laeubi

laeubi commented Jun 18, 2026

Copy link
Copy Markdown
Member

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.

This heavily depends on the use-case, e.g. many downstream mojos require at best package phase to be performed. Given the high volume of failing tests this likely breaks others and it does not aligns with your description of a mojo phase binding was changed! Instead it unconditionally skips executions now.

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.

@kwin

kwin commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

Often mojos are not bound by default (via package lifecycle) but only via explicit execution. Also not all Mojos have a default phase.

@kwin

kwin commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

@laeubi

laeubi commented Jun 18, 2026

Copy link
Copy Markdown
Member

For cases where one just want to skip one execution there are already ways for the user to do so.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin's lifecycle-mapping-metadata.xml applies irrespective of phase

3 participants