为什么我必须总是“添加 Spring 项目 Nature”? Maven“更新项目配置”之后在日食中?
我正在使用 Eclipse 处理一个通过 Maven 控制的 Spring 项目(好吧,Eclipse 中的 m2e 插件)。
每当我对 Maven pom.xml 文件进行更改时,界面都会抱怨并说我随后需要在右键单击顶级项目时从上下文菜单中看到的 Maven 项目运行“更新项目配置”。
当此完成时,项目总是失去其“Spring 项目性质”,我需要从同一上下文菜单中的 Spring 项目再次添加它。这很烦人。
为什么要这样做?
有没有办法通过向 pom.xml 添加一些内容来永久保留 Spring 项目性质?
I'm using Eclipse to work on a Spring project that is controlled via Maven (well, the m2e plugin in Eclipse).
Whenever I make a change to the Maven pom.xml file, the interface complains and says I subsequently need to run "Update project configuration" from the Maven item seen in the context menu when you right-click the top-level project.
When this completes, the project has then always lost its "Spring project nature", which I need to add again from the Spring item in the same context menu. This is quite annoying.
Why does it do this?
Is there any way to retain the Spring project nature permanently by adding something to the pom.xml?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用STS并且没有这个问题,但是我的pom.xml中也有这个插件。
I use STS and do not have that problem, but I also have this plugin in my pom.