-
Notifications
You must be signed in to change notification settings - Fork 116
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] why are some plugins bound to the package phase executed by eclipse lifecycle mapping by default and others not? #1792
Comments
In your screenshot you can see that the antrun plugin is ignored (I assume it has a mapping for that), the dependency plugin is executed because mojos are executed by default if not otherwise specified. |
@laeubi are you sure? that is the core of my question: I thought only plugins bound to "interesting phases" (i.e. up to compile) are executed by eclipse? at least that's what is written in the linked page. |
Thanks for that pointer, that's good to know. So the package phase is an "interesting" phase for m2e? I mean, plugins bound to test/install/deploy are surely never executed by m2e, right? I will check the maven-antrun-plugin... |
I checked the plugin jar and don't see a META-INF/m2e folder. Are there other ways to specify m2e mappings that I can check? |
m2e ship with some default mappings |
I am mainly trying to update my mental model of how m2e is supposed to work with relation to the package phase: I was surprised by the maven-dependency-plugin being executed, because I thought m2e would never automatically execute plugins bound to the package phase. Now you pointed me to the release notes that say that m2e executes all plugins by default, which I think is not the case at least for the test/install/deploy-phases. I believe my custom plugins bound to the package phase are also not executed by default but I have to recheck those. I tried to click on "Open workspace lifecycle mappings metadata" but got an error message and an empty editor. Edit: Now it works (but this mapping is empty). |
Yes it is not always easy when it comes to mappings, but you can open the LifeCycle Mappings as a view to at least get the info what is executed. In this particular case I think the reason is that m2e has a default mapping for So even if the package-phase is "uninteresting" by default, if there is a mapping (either implicit or explicit) m2e can execute mojos in such a phase. So here we have:
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
In Eclipse 2024-06, new workspace, when I create a simple maven project with 2 plugins bound to the package phase, one is ignored and one is executed.
I thought Eclipse only considers phases up to and including compile as 'interesting', but I couldn't find any documentation about this, only hints here: https://eclipse.dev/m2e/documentation/m2e-execution-not-covered.html
I had a look inside the maven-dependency-plugin jar but did not observe any META-INF/m2e lifecycle mapping that could explain the execution. I clearly observe the junit dependency being copied to target/dependency by the Eclipse workspace build (no manual maven execution).
Is the maven-dependency-plugin treated special by m2e?
The text was updated successfully, but these errors were encountered: