在 Eclipse (Galileo) 中安装 Maven 插件 (m2eclipse) 时出现问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2802849/
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
Problem installing Maven plugin (m2eclipse) in Eclipse (Galileo)
提问by Julian
I have Eclipse Galileo (for Java EE Developers) installed, and I'm now trying to get the m2eclipse Maven plugin installed as well.
我安装了 Eclipse Galileo(适用于 Java EE 开发人员),现在我也在尝试安装 m2eclipse Maven 插件。
I follow the basic steps described at http://m2eclipse.sonatype.org/installing-m2eclipse.html, and it seems to be installing just fine. However, after restarting Eclipse after the install it doesn't seem to be anywhere. I should for instance have the ability to create a new maven project, but when the new-project wizard opens, there is no folder for Maven (I also cannot find any reference to it in the context menus of the existing projects I have).
我遵循http://m2eclipse.sonatype.org/installing-m2eclipse.html 中描述的基本步骤,它似乎安装得很好。但是,安装后重新启动 Eclipse 后,它似乎不在任何地方。例如,我应该能够创建一个新的 Maven 项目,但是当新项目向导打开时,没有 Maven 文件夹(我在现有项目的上下文菜单中也找不到任何对它的引用)。
When I click at Help > About Eclipse > Installation Details, I find "Maven Integration for Eclipse (Required)" in the tab "Installed Software", yet another thing pointing towards a successful installation (but I can't find it under the "Plug-ins" tab, should it be there too?)...
当我单击“帮助”>“关于 Eclipse”>“安装详细信息”时,我在“已安装的软件”选项卡中找到了“Eclipse 的 Maven 集成(必需)”,还有另一件事指向成功安装(但我在“插件”选项卡,它也应该在那里吗?)...
I feel like I'm just missing something veryobvious, but right now I just don't see it...
我觉得我只是错过了一些非常明显的东西,但现在我只是没有看到它......
采纳答案by Julian
I managed to find the answer to this myself:
我设法自己找到了答案:
I had put the Eclipse installation folder under c:\Program Files\, but when I moved it directly under c:\ instead, the plug-in installation worked just as it should. I assume that is because Eclipse wasn't allowed to write to its own installation folder (but I didn't get the usual question from Windows that something was trying to access Program Files either...).
我已经将 Eclipse 安装文件夹放在 c:\Program Files\ 下,但是当我将它直接移到 c:\ 下时,插件安装就正常工作了。我认为这是因为不允许 Eclipse 写入它自己的安装文件夹(但我没有从 Windows 得到通常的问题,即某些东西试图访问程序文件......)。
In one way I feel like I should be a bit ashamed that I didn't think of this before. On the other hand though, there could have been some reasonable error message stating that something failed during the plug-in installation...
在某种程度上,我觉得我应该为我以前没有想到这一点而感到羞耻。但另一方面,可能有一些合理的错误消息表明插件安装过程中出现了某些故障......
Well, I hope this at least helps somebody else as well :)
好吧,我希望这至少也能帮助其他人:)
回答by VonC
Did you check the m2eclipse installation requirements?
In particular, you need WTP.
您是否检查了m2eclipse 安装要求?
特别是,你需要支付意愿。
"Maven integration for Eclipse" (core feature) and optional "Maven POM Editor" feature depend on the "Eclipse XML Editors and Tools" feature from WST
"Maven integration for WTP" feature provides Maven project configuration for WTP
“Eclipse 的 Maven 集成”(核心功能)和可选的“Maven POM 编辑器”功能取决于 WST 的“Eclipse XML 编辑器和工具”功能
“WTP 的 Maven 集成”功能为 WTP 提供 Maven 项目配置
回答by Pascal Thivent
Did you have a previous version of m2eclipse installed? Did you uninstall it before to install the latest version? Just in case, does the following note applies to you?
您是否安装了以前版本的 m2eclipse?您之前是否卸载它以安装最新版本?以防万一,以下说明是否适用于您?
Note about 0.9.8 Workspace Incompatibility:If you are using m2eclipse 0.10.0 with a workspace that contains projects created under m2eclipse 0.9.8, you must remove the workspaceState.ser file. The workspaceState.ser file is located within the workspace directory in $workspacedir/.metadata/.plugins/org.maven.ide.eclipse/workspaceState.ser. If you remove this file, m2eclipse 0.10.0 will regenerate it as needed.
关于 0.9.8 工作区不兼容性的注意事项:如果您将 m2eclipse 0.10.0 与包含在 m2eclipse 0.9.8 下创建的项目的工作区一起使用,则必须删除 workspaceState.ser 文件。workspaceState.ser 文件位于 $workspacedir/.metadata/.plugins/org.maven.ide.eclipse/workspaceState.ser 中的工作空间目录中。如果删除此文件,m2eclipse 0.10.0 将根据需要重新生成它。
In my case, uninstalling the previous m2eclipse version didn't work and I had to start with a fresh Eclipse install (maybe try this also).
在我的情况下,卸载以前的 m2eclipse 版本不起作用,我不得不从全新的 Eclipse 安装开始(也许也可以试试这个)。
Regarding the plugin tab, this is what I have (to confirm that you should definitely find something):
关于插件选项卡,这就是我所拥有的(确认您肯定应该找到一些东西):
alt text http://www.imagebanana.com/img/84h6mw8z/screenshot_008.png
替代文字 http://www.imagebanana.com/img/84h6mw8z/screenshot_008.png
Note that I also installed some extras from m2eclipse Extras Update Site: http://m2eclipse.sonatype.org/sites/m2e-extras
请注意,我还从 m2eclipse Extras 更新站点安装了一些附加功能:http: //m2eclipse.sonatype.org/sites/m2e-extras
回答by JSmith
I was able to solve this problem by going into Program Files, right click on the eclipse.exe file and select "Run as administrator". When I restarted Eclipse it said I had no plugins installs so I reinstalled and my problems were solved.
我可以通过进入 Program Files 解决这个问题,右键单击 eclipse.exe 文件并选择“以管理员身份运行”。当我重新启动 Eclipse 时,它说我没有安装插件,所以我重新安装并解决了我的问题。
回答by Haxed
PROBLEM SOLVED I had this same problem and I used the following software site: ["M2Eclipse - http://download.eclipse.org/technology/m2e/releases/1.0] (without square brackets) to download the M2Eclipse plugin in Eclipse 3.7.0 (Indigo). For more information refer this.
问题解决了我遇到了同样的问题,我使用以下软件站点:["M2Eclipse - http://download.eclipse.org/technology/m2e/releases/1.0](不带方括号)下载 Eclipse 3.7 中的 M2Eclipse 插件.0(靛蓝)。有关更多信息,请参阅此。
回答by L.Sidhu
To solve the problem of 'not getting Maven plugin running in eclipse' , it can be solved by altering admin rights to the .m2 folder . Right click on .m2 folder and go to network sharing. give all rights to all users. Restart eclipse and maven options will start to appear in Eclipse.
要解决“在 Eclipse 中无法运行 Maven 插件”的问题,可以通过更改 .m2 文件夹的管理员权限来解决。右键单击 .m2 文件夹并转到网络共享。赋予所有用户所有权利。重启 eclipse 和 maven 选项将开始出现在 Eclipse 中。