gpt4 book ai didi

eclipse - m2e-wtp错误: /target/m2e-wtp/web-resources/META-INF/MANIFEST. MF(没有这样的文件或目录)

转载 作者:行者123 更新时间:2023-12-03 05:31:30 27 4
gpt4 key购买 nike

我使用 m2e 1.2.0 和 m2e-wtp 0.16.0,有时我的 Eclipse 构建会失败并出现以下错误:

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

可以通过执行 Maven->Update project... 暂时解决该问题,但过一段时间错误又会出现。不确定触发器到底是什么......

关于如何永久解决该问题有什么建议吗?

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

最佳答案

早于 Luna 的 Eclipse 版本

我不确定这是否是最好的做法,但我遵循了上述说明 here关于摆脱自动生成的 Web 资源文件夹,这似乎也解决了缺少 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"

当我们真正想要打包/构建项目时,我们实际上会生成 list 条目作为 maven-war-plugin 的一部分,但我不认为 m2e-wtp 使用它。无论如何,在 m2e-wtp 创建的 Eclipse 中使用的构建中, list 文件与我们无关。

Eclipse Luna 及更高版本

对于 Eclipse Luna 你必须去:

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

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

关于eclipse - m2e-wtp错误: <path>/target/m2e-wtp/web-resources/META-INF/MANIFEST. MF(没有这样的文件或目录),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14659891/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com