Java 即使在 m2e 安装之后 Maven 也没有出现在 Eclipse (Kepler) 中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18687621/
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
Maven not showing up in Eclipse (Kepler) even after m2e install
提问by Kyle Walker
I've seen that others have had this problem where Maven doesn't show up for them in Eclipse after installing the m2e plugin, but most of the solutions seem to suggest doing something like "Configure>Convert to Maven." But Maven is not showing up for me in the Configure list, nor is it showing up in Console>Open Console or the File>New list. I see some solutions refer to editing the project's classpath, but I don't have a clear understanding of how to do that. I'm trying to begin working through a book on Java EE7, and it uses Maven in the examples. Can someone help?
我已经看到其他人遇到了这个问题,在安装 m2e 插件后 Maven 没有出现在 Eclipse 中,但大多数解决方案似乎建议做一些类似“配置>转换为 Maven”的事情。但是 Maven 没有出现在配置列表中,也没有出现在控制台>打开控制台或文件>新建列表中。我看到一些解决方案涉及编辑项目的类路径,但我不清楚如何做到这一点。我正在尝试开始阅读一本关于 Java EE7 的书,它在示例中使用了 Maven。有人可以帮忙吗?
回答by Andriy F.
Have you tried to download Eclipse Java EE (http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/keplerr)? It already has Maven installed
您是否尝试过下载 Eclipse Java EE ( http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/kepler)?它已经安装了Maven
回答by Gyanendra Dwivedi
First, please ensure that m2e is correctly install. To test this, just right click on the project and you should be able to see 'Maven' in the context menu.
首先,请确保正确安装了 m2e。要对此进行测试,只需右键单击该项目,您应该能够在上下文菜单中看到“Maven”。
If it is showing, just choose 'Update project config'; as soon as this is updated, the m2e recognizes and build the project as maven.
如果显示,只需选择“更新项目配置”;一旦更新,m2e 就会将项目识别并构建为 maven。
After that, please check if project property-> build path -> lib tab shows maven dependency along with default JRE in the library path.
之后,请检查项目属性-> 构建路径-> lib 选项卡是否显示库路径中的 maven 依赖项以及默认 JRE。
回答by Chris Gerken
Check the .log file in the .metadata folder in your workspace folder. Delete the .log file and then restart Eclipse using the -clean option. If maven doesn't appear in the UI the look at the .log file for hints of why maven couldn't be loaded.
检查工作区文件夹中 .metadata 文件夹中的 .log 文件。删除 .log 文件,然后使用 -clean 选项重新启动 Eclipse。如果 Maven 未出现在 UI 中,请查看 .log 文件以了解无法加载 Maven 的原因。
回答by user2959152
It is basically permission problem if u are using linux. Delete the eclipse folder and workspace directory(/home/user/workspace). Extract the eclipse again using root. Give full permission to eclipse folder and launch eclipse using root. then install maven plugin from marketplace or installNewSoftware page. It should work then.
如果您使用的是 linux,这基本上是权限问题。删除eclipse文件夹和工作区目录(/home/user/workspace)。使用 root 再次提取 eclipse。授予对 eclipse 文件夹的完全权限并使用 root 启动 eclipse。然后从市场或 installNewSoftware 页面安装 maven 插件。它应该工作。
回答by Kyle Walker
In the end, I just uninstalled and reinstalled Eclipse. Not sure what was causing the problem in the first place, but this seems to have done the trick. I made sure to install the Java EE version of Eclipse and Maven is showing up now.
最后,我只是卸载并重新安装了 Eclipse。首先不确定是什么导致了问题,但这似乎已经解决了问题。我确保安装了 Java EE 版本的 Eclipse,现在 Maven 出现了。
回答by TastyWheat
I had this same problem and I discovered that, oddly enough, closing and reopening Eclipse is NOTthe same thing as "restarting" Eclipse. When it asks if you want to restart now either choose Yes or choose Restart from the File menu.
我有这个同样的问题,我发现,奇怪的是,关闭并重新打开Eclipse是不一样的东西“重新启动”的Eclipse。当它询问您是否要立即重新启动时,请选择“是”或从“文件”菜单中选择“重新启动”。