eclipse M2Eclipse, META-INF/MANIFEST.MF
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4346624/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
M2Eclipse, META-INF/MANIFEST.MF
提问by Maxence
I use the M2Eclipse plugin in Eclipse.
我在 Eclipse 中使用 M2Eclipse 插件。
And I don't know for what reason, each time I import a Maven project in Eclipse, it always generates an empty - src/main/META-INF/MANIFEST.MF file (jar-packaged projects) - src/main/webapp/META-INF/MANIFEST.MF file (war-packaged projects)
而且不知道什么原因,每次在Eclipse中导入一个Maven项目,总是生成一个空的——src/main/META-INF/MANIFEST.MF文件(jar打包的项目)——src/main/webapp /META-INF/MANIFEST.MF 文件(War打包项目)
I find this a bit annoying ;-) Does someone know how to disable this behavior ?
我觉得这有点烦人;-) 有人知道如何禁用这种行为吗?
Thanks
谢谢
采纳答案by Fred Bricon
This was fixedin m2e-wtp 0.13.0. Latest m2e-wtp version can be found at http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/
这已在 m2e-wtp 0.13.0 中修复。最新的 m2e-wtp 版本可以在http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/找到
The root cause of the problem is WTP's Dynamic Web Facet, which automatically creates a MANIFEST.MF when it's installed. m2e-wtp now removes the file if it was created by WTP, but leaves any existing MANIFEST.MF.
问题的根本原因是 WTP 的 Dynamic Web Facet,它在安装时会自动创建一个 MANIFEST.MF。如果文件是由 WTP 创建的,m2e-wtp 现在会删除该文件,但保留任何现有的 MANIFEST.MF。
回答by joelittlejohn
I believe this is caused by the WTP addon for m2eclipse. If you aren't using it, try uninstalling the WTP Extras.
我相信这是由 m2eclipse 的 WTP 插件引起的。如果您不使用它,请尝试卸载 WTP Extras。
回答by Neale Upstone
It's non-maven behaviour which I think is down to WTP being 'naughty'. It really shouldn't add anything to your source folders, and also this behaviour should not just happen to pick one of a number of source folders. I've seen it add this to src/test/java too.
这是非行家行为,我认为这归结于 WTP 是“顽皮”。它真的不应该向您的源文件夹添加任何内容,而且这种行为不应该只是在选择多个源文件夹之一时发生。我已经看到它也将它添加到 src/test/java 中。