在 Ubuntu 的 eclipse 3.8 中安装 maven
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32152665/
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
Install maven in eclipse 3.8 in Ubuntu
提问by vico
I have installed "default" eclipse 3.8 in Ubuntu. I would like to install Maven support on it. I do
我已经在 Ubuntu 中安装了“默认”eclipse 3.8。我想在其上安装 Maven 支持。我愿意
1) In eclipse, go to "Help->Install New Software"
1)在eclipse中,转到“帮助->安装新软件”
2) press "Add" in the upper right button in the opened window
2)在打开的窗口中按右上角的“添加”
3) set the name textbox to be "Maven2Eclipse"
3)将名称文本框设置为“Maven2Eclipse”
4) set the value textbox to be http://download.eclipse.org/technology/m2e/releases
4) 将值文本框设置为http://download.eclipse.org/technology/m2e/releases
5) after press OK I got following error:
5)按确定后,我收到以下错误:
Cannot satisfy dependency:
From: Maven Integration for Eclipse JDT UI 1.5.1.20150109-1820 (org.eclipse.m2e.jdt.ui 1.5.1.20150109-1820)
Cannot complete the install because one or more required items could not be found.
Software being installed: m2e - Maven Integration for Eclipse (includes Incubating components) 1.5.1.20150109-1820 (org.eclipse.m2e.feature.feature.group 1.5.1.20150109-1820)
Missing requirement: Maven Integration for Eclipse 1.5.0.20140606-0033 (org.eclipse.m2e.core 1.5.0.20140606-0033) requires 'bundle org.slf4j.api 1.6.2' but it could not be found
Missing requirement: Maven Integration for Eclipse 1.5.1.20150109-1820 (org.eclipse.m2e.core 1.5.1.20150109-1820) requires 'bundle org.slf4j.api 1.6.2' but it could not be found
Missing requirement: Maven Integration for Eclipse 1.5.2.20150413-2215 (org.eclipse.m2e.core 1.5.2.20150413-2215) requires 'bundle org.slf4j.api 1.6.2' but it could not be found
Cannot satisfy dependency:
From: m2e - Maven Integration for Eclipse (includes Incubating components) 1.5.1.20150109-1820 (org.eclipse.m2e.feature.feature.group 1.5.1.20150109-1820)
To: org.eclipse.m2e.jdt.ui [1.5.1.20150109-1820]
Cannot satisfy dependency:
From: Maven Integration for Eclipse JDT UI 1.5.1.20150109-1820 (org.eclipse.m2e.jdt.ui 1.5.1.20150109-1820)
To: bundle org.eclipse.m2e.core [1.5.0,1.6.0)
How to solve this problem?
如何解决这个问题呢?
回答by paulsm4
It sounds like it might be a version issue.
听起来可能是版本问题。
I've never had any problem installing Maven (or SVN, or any related plugins) ... but I don't happen to have a copy of Juno handy to double-check for you.
我在安装 Maven(或 SVN,或任何相关插件)时从来没有遇到任何问题……但我没有手边的 Juno 副本来为您仔细检查。
SUGGESTION:
建议:
Make sure you're pointing to the Eclipse 3.8 (and only3.8) repositories
Try installing m2e with that repo
确保您指向 Eclipse 3.8(并且只有3.8)存储库
尝试使用该 repo 安装 m2e
http://archive.eclipse.org/eclipse/downloads/drops/R-3.8.2-201301310800/
http://archive.eclipse.org/eclipse/downloads/drops/R-3.8.2-201301310800/
http://download.eclipse.org/releases/juno/
http://download.eclipse.org/releases/juno/
ADDENDUM:
附录:
Here's what I did on Luna, on CentOS Linux:
这是我在 CentOS Linux 上的 Luna 上所做的:
Eclipse > Help > Install Software (not"Marketplace*)
Work With > http://downloads.eclipse.org/releases/luna
filter text > m2e, [ENTER]
m2e Maven Integration = Y <= the package you want
m2e sl4j = Y <= the dependency in your error
Eclipse > 帮助 > 安装软件(不是“Marketplace*”)
过滤文本 > m2e, [ENTER]
m2e Maven Integration = Y <= 你想要的包
m2e sl4j = Y <= 错误中的依赖
- [Finish] => everything installed OK
- [完成] => 一切安装好
回答by Zokorotroko
What I did was first of all, running eclipse with root privileges in order to update the environment: Eclipse > Help > Check for Updates. Then I could install maven as said above, Eclipse > Help > Install Software, etc, etc.
我所做的首先是使用 root 权限运行 eclipse 以更新环境:Eclipse > 帮助 > 检查更新。然后我可以像上面说的那样安装 maven,Eclipse > 帮助 > 安装软件等等。
回答by Shubham Sharma
Same error i was getting today .
我今天遇到了同样的错误。
Cannot complete the install because one or more required items could not be found.
Software being installed: m2e - Maven Integration for Eclipse (includes Incubating components) 1.8.1.20170728-1531 (org.eclipse.m2e.feature.feature.group 1.8.1.20170728-1531)
Missing requirement: Maven Integration for Eclipse 1.8.1.20170728-1531 (org.eclipse.m2e.core 1.8.1.20170728-1531) requires 'bundle org.eclipse.osgi 3.10.0' but it could not be found
Cannot satisfy dependency:
From: Maven Integration for Eclipse 1.8.1.20170728-1531 (org.eclipse.m2e.core.ui 1.8.1.20170728-1531)
To: bundle org.eclipse.m2e.core [1.8.1,1.9.0)
Cannot satisfy dependency:
From: m2e - Maven Integration for Eclipse (includes Incubating components) 1.8.1.20170728-1531 (org.eclipse.m2e.feature.feature.group 1.8.1.20170728-1531)
To: org.eclipse.m2e.core.ui [1.8.1.20170728-1531]
After spending a lot hours i found that http://download.eclipse.org/technology/m2e/releaseswill not work . Now steps to solve error is , Open Eclipse -> Help -> Install New Software -> Add http://download.eclipse.org/technology/m2e/releases/1.3. It should definatly solve your issue
花了很多时间后,我发现http://download.eclipse.org/technology/m2e/releases不起作用。现在解决错误的步骤是,打开Eclipse->帮助->安装新软件->添加http://download.eclipse.org/technology/m2e/releases/1.3。它绝对可以解决您的问题