m2e-wtp错误:< path> /target/m2e-wtp/web-resources/META-INF/MANIFEST.MF(没有这样的文件或目录) [英] m2e-wtp error: <path>/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF (No such file or directory)

查看:2563
本文介绍了m2e-wtp错误:< path> /target/m2e-wtp/web-resources/META-INF/MANIFEST.MF(没有这样的文件或目录)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用m2e 1.2.0和m2e-wtp 0.16.0,偶尔我的Eclipse构建失败,出现错误:

 < path> /target/m2e-wtp/web-resources/META-INF/MANIFEST.MF(没有这样的文件或目录)

可以通过执行 Maven->更新项目... 暂时解决问题,但错误会在一段时间后回来。不确定什么是触发器....



有关如何永久解决问题的任何建议?



我发现,当我直接使用Maven命令行外部构建项目时,会触发该问题。这将删除m2e-wtp生成的默认MANIFEST.MF,并且在Eclipse中重建之前显然不会重新生成。

解决方案

早于Luna的Eclipse版本



我不确定这是否是最好的事情,但我按照说明提到的
这里关于摆脱自动生成的Web资源文件夹,这似乎也解决了丢失的MANIFEST.MF的问题:

$ b $仅在项目中单击b

  • :右键单击项目>属性> Maven> WTP:选中启用项目特定设置,然后取消选中Maven Archiver生成构建目录下的文件整个工作区中的
  • :Window> Preferences> Maven> WTP:取消选中Maven Archiver生成目录下的文件


当我们真正想要打包/构建项目时,我们实际上会生成我们的清单条目作为maven-war-plugin的一部分,b我不认为m2e-wtp使用这个。在任何情况下,清单文件对于我们在m2e-wtp创建用于eclipse中的构建无关。



Eclipse Luna及更高版本



对于Eclipse Luna,你必须去:


首选项> Maven> Java EE集成并取消选中Maven Archiver生成构建目录下的文件。


Eclipse Luna在项目属性和WTP部分没有路径


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 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

这篇关于m2e-wtp错误:&lt; path&gt; /target/m2e-wtp/web-resources/META-INF/MANIFEST.MF(没有这样的文件或目录)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆