-
Notifications
You must be signed in to change notification settings - Fork 7
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
Error with war packaging since m2e 2.2.0.20230228 #23
Comments
Have you checked what is complained here?
|
Sure, I saw that, but I don't have any explicit usage of maven-resources-plugin, so not sure what is happening here. |
copy-resources a default goal of the war-life-cycle so you have it enabled always. The best way would be if you can reproduce the problem with a self contained demo-project so one can beter see whats going on. Another option would be to take a look at the effective pom. |
I can reproduce the issue with the simplest war project you can think of: https://github.com/laurent149/maven-war-plugin-demo <plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
</execution>
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin> |
Couldn't it be that the mojo executions were skipped by default so far, and that they become on by default in latest release; and cause some mojo executions to be triggered, including some of them to fail? @laeubi looking at the definition of the war lifecycle in plexus/components.xml of the maven-war-plugin-3.3.2.jar shows no reference to copy-resources mojo. So it's indeed very curious that such issue arises. I tried importing it and didn't see any issue, even when referencing non-existing plugin types; so I suspect my m2e setup is also broken. |
The original stack trace said it is executed as |
I tried to reproduce the issue on a freshly installed Eclipse and I couldn't. |
Eclipse is getting very slow here, as it seems various static-analysis Mojo are running while previously skipped. |
Go to the pom, select the mojo execution you don't want (it should get an info icon) and select "disable ..." from the QuickFix. As an alternative, you can configure the default behavior here: |
Thw Web project configurator executes the maven-resources-plugin:copy-resources goal when web resources filtering is enabled:
Somehow it broke with m2e 2.2.0 |
@laeubi this was broken by eclipse-m2e/m2e-core@5640b34#diff-796a271293c65b5cac9c04a4dccddff344e43fd10f474a5cd2992c2333325704R329 When cloning the MojoExecution, the MojoExecution configuration set by m2e-wtp is not copied over, effectively calling an incomplete mojo execution |
Since a recent m2e update (2.2.0.20230228), I'm seeing the following error on all my projects using maven-war-plugin:
How can I address this? Preferably without pom modifications (otherwise I have tens of projects to update).
The text was updated successfully, but these errors were encountered: