在 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

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

Install maven in eclipse 3.8 in Ubuntu

javaeclipsemavenubuntu

提问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:

建议:

  1. Make sure you're pointing to the Eclipse 3.8 (and only3.8) repositories

  2. Try installing m2e with that repo

  1. 确保您指向 Eclipse 3.8(并且只有3.8)存储库

  2. 尝试使用该 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 上所做的:

  1. Eclipse > Help > Install Software (not"Marketplace*)

  2. Work With > http://downloads.eclipse.org/releases/luna

  3. filter text > m2e, [ENTER]

  4. m2e Maven Integration = Y <= the package you want

    m2e sl4j = Y <= the dependency in your error

  1. Eclipse > 帮助 > 安装软件(不是“Marketplace*”)

  2. 使用 > http://downloads.eclipse.org/releases/luna

  3. 过滤文本 > m2e, [ENTER]

  4. m2e Maven Integration = Y <= 你想要的包

    m2e sl4j = Y <= 错误中的依赖

Install m2e integration and sl4j packages

安装 m2e 集成和 sl4j 包

  1. [Finish] => everything installed OK
  1. [完成] => 一切安装好

回答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。它绝对可以解决您的问题