Eclipse m2e-wtp插件不断覆盖application.xml
我继承了一个项目,其中我们已经为我的 maven-ear-plugin 项目提供了 application.xml 文件。我们必须使用它。但是当我将这个该死的项目导入到 eclipse 中时,它不断地覆盖这个文件 - 我必须去本地历史记录并恢复它。
每次有人进行干净的构建、更改项目设置等时,该文件都会被 eclipse 中的某些内容覆盖(我假设是 m2e 插件)。我如何告诉它不要管该文件。我不应该碰它,所以它也不是。
在构建目录中生成文件的设置是无关紧要的 - 我不希望它生成任何内容。
I've inherited a project where we already have an application.xml file for my maven-ear-plugin project. We have to use that. But when I import this bloody project into eclipse, it is constantly overwriting this file - I have to go to local history and recover it.
Every time anyone does a clean build, changes project settings, etc., the file is overwritten by something in eclipse (I am assuming the m2e plugin). How do I tell it to leave the frigging file alone. I'm not supposed to touch it, so neither is it.
The setting to generate the file in the build directory is irrelevant - I do not want it to generate anything.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需将
false
添加到您的 maven-ear-plugin 配置中Simply add
<generateApplicationXml>false</generateApplicationXml>
to your maven-ear-plugin configuration这是 m2e-wtp 中的一个错误。
我已经提交了一份类似的报告,用于不断修改 org.eclipse.wst.common.component 文件 -> https://issues.sonatype.org/browse/MECLIPSEWTP-146
他们声称已修复为下一个版本。也许它也能解决你的问题。
如果没有,请向 Sonatype 提交一个新错误,因为您可以看到它们的响应速度非常快。
同时,如果您知道您没有更改 application.xml,则只需删除它并从源代码管理中恢复它即可。这就是我最终对“组件”文件所做的事情。
我猜,这就是走在前沿的代价。
It's a bug in m2e-wtp.
I've submitted a similar report for constant modification of org.eclipse.wst.common.component file -> https://issues.sonatype.org/browse/MECLIPSEWTP-146
They claim it's fixed for the next release. Maybe it also fixes your problem.
If it does not, submit a new bug to Sonatype, as you can see they are very responsive.
In the meantime, if you know that you are not changing application.xml, then just delete it and recover it from your source control. That is what I ended up doing with 'component' file.
Guess, that's the price of being on a cutting edge.