为 eclipse 上的项目恢复 maven 插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9823350/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:51:50  来源:igfitidea点击:

Restore maven plugin for a project on eclipse

eclipsem2eclipse

提问by kunigami

I've disabled m2eclipse plugin for a project by clicking on "Disable Maven Nature" as shown in the Figure below. Then the Maven entry disappeared from the menu and I'm unable to restore it.

我已经通过单击“禁用 Maven Nature”来禁用项目的 m2eclipse 插件,如下图所示。然后 Maven 条目从菜单中消失了,我无法恢复它。

enter image description here

在此处输入图片说明

How do I restore/reset/re-enable so that the entry appears again?

如何恢复/重置/重新启用以便再次出现该条目?

PS 1: I'd like to do that without re-importing the project.

PS 1:我想在不重新导入项目的情况下做到这一点。

PS 2: I've looked in ${WORKSPACE}/.metadata\.plugins\org.eclipse.m2e.core.uiand ${WORKSPACE}/.metadata\.plugins\org.eclipse.m2e.corebut nothing seems related.

PS 2:我已经看过了${WORKSPACE}/.metadata\.plugins\org.eclipse.m2e.core.ui${WORKSPACE}/.metadata\.plugins\org.eclipse.m2e.core但似乎没有任何关系。

回答by kunigami

Solution:

解决方案:

Go to the project menu (right click on Package Explorer) > Configure> Convert to Maven Project

转到项目菜单(右键单击包资源管理器)> Configure>Convert to Maven Project

This should restore the entry in the project menu.

这应该恢复项目菜单中的条目。