Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

eclipse

m2e

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.

like image 479
Jelle van Geuns Avatar asked Feb 02 '13 07:02

Jelle van Geuns


3 Answers

Eclipse versions earlier than Luna

I'm not certain if this is the best thing to do but I followed the instructions mentioned here with regards to getting rid of the auto generated web resources folder and this seems to also resolve the issue with the missing MANIFEST.MF:

  • on your project only : right-click on the project > Properties > Maven > WTP : check "Enable Project Specific Settings" and uncheck "Maven Archiver generates files under the build directory"
  • on the whole workspace : Window > Preferences > Maven > WTP : uncheck "Maven Archiver generates files under the build directory"

We actually generate our manifest entries as part of the maven-war-plugin when we actually want to package/build the project, but I dont think m2e-wtp uses this. In any event, the manifest file is irrelevant for us in the build that m2e-wtp creates for use within eclipse.

Eclipse Luna and later

For Eclipse Luna you have to go:

Preferences > Maven > Java EE Integration and uncheck "Maven Archiver generates files under the build directory".

Eclipse Luna does not have the path at project Properties and the WTP section

like image 78
cosjav Avatar answered Oct 16 '22 15:10

cosjav


This solution works for me Rightclick on Project --> Properties --> Maven --> Java EE Integration --> check enable project specific settings and disable Maven archiver generates files

like image 34
VijayaKumar Thangavel Avatar answered Oct 16 '22 16:10

VijayaKumar Thangavel


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

Project>Clean

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

like image 28
Mehdi Avatar answered Oct 16 '22 14:10

Mehdi