m2e-wtp error: /target/m2e-wtp/web-resources

2019-01-21 08:45发布

I use m2e 1.2.0 and m2e-wtp 0.16.0, and occasionally my Eclipse build fails with the error:

<path>/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF (No such file or directory)

The problem can be temporarily solved by doing a Maven->Update project..., but the error will come back after a while. Not sure what exactly the trigger is....

Any suggestions on how to fix the issue permanently?

[Edit] I found that the issue is triggered when I build the project externally using the Maven command line directly. This will remove the default MANIFEST.MF that m2e-wtp generates, and it apparently doesn't get regenerated until you do a rebuild in Eclipse.

标签: eclipse m2e
17条回答
聊天终结者
2楼-- · 2019-01-21 09:22

Try to select your project, and clean it by using the menu :

Project>Clean

Then refresh your pom.xml. That worked for me .

查看更多
欢心
3楼-- · 2019-01-21 09:23

Clean All Projects will solve this issue.

查看更多
forever°为你锁心
4楼-- · 2019-01-21 09:29

Cleaning the project didn't do the trick,There were 2 external jars that were added to the build path removing them and moving them inside pom.xml really fixed the issue for me.

查看更多
别忘想泡老子
5楼-- · 2019-01-21 09:30

To make sure resources are properly refreshed, as maven cleans up target, you can setup maven build to automatically refresh project + target folder, etc.,.

Check the option to automatically refresh resources in your maven build

查看更多
小情绪 Triste *
6楼-- · 2019-01-21 09:31

in my case (Eclipse Neon), I enabled Maven Archiver generates files under build directory

查看更多
登录 后发表回答