2

我已经安装了 Eclipse Indigo SR2 EE:

Eclipse Java EE IDE for Web Developers.
Version: Indigo Service Release 2 
Build id: 20120216-1857

甚至在从 Marketplace 安装 m2e 之后,我在 File->Import、File->New->Project... 或 Window->Preferences 中也没有任何 Maven 菜单项。

我真的很困惑。我在一台 Fedora 17 x64 机器上——而我的另一台 Fedora 17 x64 机器在使用相同版本的 Eclipse 时运行良好!

m2e 在“已安装的软件”中清楚显示:

  m2e - Maven Integration for Eclipse   1.0.200.20111228-1245   org.eclipse.m2e.feature.feature.group   Eclipse.org - m2e

...并出现在配置报告中。然而它在 UI 中是完全不可见的,这让我发疯了。

更新:错误日志中的某些内容可能很重要 - 至少,它与 m2e 相关。请参阅-consolelog 此处或帖子末尾附近的缩写粘贴。

我对 Eclipse 还很陌生,所以我可能正在做一些愚蠢的事情——但无论是什么,Eclipse 都可以让问题更加明显。

这与“Eclipse Indigo for JAVA EE + Maven 插件 = Maven 菜单未出现在导入和首选项中”不同;他们的 m2e 没有正确安装,这显示为已安装并且 Eclipse 不会重新安装它,因为它已经安装,因此在“安装新软件...”中显示为灰色。

从命令行启动 Eclipse 时,stdout/stderr 上不会发出任何错误。

我正在使用:

java -version
java version "1.7.0_b147-icedtea"
OpenJDK Runtime Environment (fedora-2.1.fc17.6-x86_64)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)

这在工作的工作站上运行良好。ls -d plugins/*m2e*显示:

plugins/org.eclipse.m2e.archetype.common_1.0.200.20111228-1245           plugins/org.eclipse.m2e.logback.appender_1.0.200.20111228-1245.jar
plugins/org.eclipse.m2e.core_1.0.200.20111228-1245.jar                   plugins/org.eclipse.m2e.logback.configuration_1.0.200.20111228-1245.jar
plugins/org.eclipse.m2e.core.ui_1.0.200.20111228-1245.jar                plugins/org.eclipse.m2e.maven.indexer_1.0.200.20111228-1245
plugins/org.eclipse.m2e.discovery_1.0.200.20111228-1245.jar              plugins/org.eclipse.m2e.maven.runtime_1.0.200.20111228-1245
plugins/org.eclipse.m2e.editor_1.0.200.20111228-1245.jar                 plugins/org.eclipse.m2e.model.edit_1.0.200.20111228-1245.jar
plugins/org.eclipse.m2e.editor.xml_1.0.200.20111228-1245.jar             plugins/org.eclipse.m2e.refactoring_1.0.200.20111228-1245.jar
plugins/org.eclipse.m2e.jdt_1.0.200.20111228-1245.jar                    plugins/org.eclipse.m2e.scm_1.0.200.20111228-1245.jar
plugins/org.eclipse.m2e.launching_1.0.200.20111228-1245.jar              plugins/org.eclipse.m2e.usagedata_1.0.200.20111228-1245.jar
plugins/org.eclipse.m2e.lifecyclemapping.defaults_1.0.200.20111228-1245  plugins/org.sonatype.m2e.mavenarchiver_0.15.0.201109290002.jar

可能很严重的-consolelog错误:

16:58:08,042 |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not create component [filter] of type [org.eclipse.m2e.logback.appender.ConsoleAppenderFilter] java.lang.ClassNotFoundException: org.eclipse.m2e.logback.appender.ConsoleAppenderFilter
        at java.lang.ClassNotFoundException: org.eclipse.m2e.logback.appender.ConsoleAppenderFilter
        at      at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
        at      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
        at      at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
        at      at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        at      at ch.qos.logback.core.util.Loader.loadClass(Loader.java:110)
        at      at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.begin(NestedComplexPropertyIA.java:100)
        at      at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:273)
        at      at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
        at      at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:127)
        at      at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:40)
        at      at ch.qos.logback.core.joran.spi.Interpreter.play(Interpreter.java:332)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:126)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:93)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:52)
        at      at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:190)
        at      at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:149)
        at      at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:112)
        at      at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:65)
        at      at java.util.TimerThread.mainLoop(Timer.java:555)
        at      at java.util.TimerThread.run(Timer.java:505)

从 Eclipse 安装的软件列表:

  Context and Dependency Injection Tools    1.2.0.v20120504-0314-H63-Beta3  org.jboss.tools.cdi.feature.feature.group   JBoss by Red Hat
  Eclipse EGit  1.3.0.201202151440-r    org.eclipse.egit.feature.group  Eclipse EGit
  Eclipse IDE for Java EE Developers    1.4.2.20120213-0813 epp.package.jee null
  Eclipse JGit  1.3.0.201202151440-r    org.eclipse.jgit.feature.group  Eclipse JGit
  Forge Tools   1.0.0.v20120504-2048-H71-Beta3  org.jboss.tools.forge.feature.feature.group JBoss by Red Hat
  Hibernate Tools   3.4.0.v20120504-2121-H72-Beta3  org.hibernate.eclipse.feature.feature.group JBoss by Red Hat
  JBoss Archives Tools  3.2.1.v20120504-0235-H64-Beta3  org.jboss.ide.eclipse.archives.feature.feature.group    JBoss by Red Hat
  JBoss Central Community   1.0.0.v20120514-1749-H82-Beta3  org.jboss.tools.community.central.feature.feature.group JBoss by Red Hat
  JBoss JAX-RS Tools    1.2.2.v20120514-1752-H106-Beta3 org.jboss.tools.ws.jaxrs.feature.feature.group  JBoss by Red Hat
  JBoss Maven CDI Configurator  1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.cdi.feature.feature.group JBoss by Red Hat
  JBoss Maven Hibernate Configurator    1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.hibernate.feature.feature.group   JBoss by Red Hat
  JBoss Maven Integration   1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.feature.feature.group JBoss by Red Hat
  JBoss Maven JAX-RS Configurator   1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.jaxrs.feature.feature.group   JBoss by Red Hat
  JBoss Maven JPA Configurator  1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.jpa.feature.feature.group JBoss by Red Hat
  JBoss Maven JSF Configurator  1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.jsf.feature.feature.group JBoss by Red Hat
  JBoss Maven Project Examples  1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.project.examples.feature.feature.group    JBoss by Red Hat
  JBoss Maven Seam Integration  1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.seam.feature.feature.group    JBoss by Red Hat
  JBoss OpenShift Tools 2.3.0.v20120510-2034-H93-Beta3  org.jboss.tools.openshift.express.feature.feature.group JBoss by Red Hat
  JBoss Packaging Maven Configurators   1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.jbosspackaging.feature.feature.group  JBoss by Red Hat
  JBoss Runtime AS Detector 1.3.0.v20120504-1621-H89-Beta3  org.jboss.tools.runtime.as.detector.feature.feature.group   JBoss by Red Hat
  JBoss Runtime Detection Core  1.3.0.v20120504-1621-H89-Beta3  org.jboss.tools.runtime.core.feature.feature.group  JBoss by Red Hat
  JBoss Tools Community Project Examples    1.2.1.v20120504-1659-H91-Beta3  org.jboss.tools.community.project.examples.feature.feature.group    JBoss by Red Hat
  JBoss Tools EGit Integration (Experimental)   2.3.0.v20120510-2034-H93-Beta3  org.jboss.tools.openshift.egit.integration.feature.feature.group    JBoss by Red Hat
  JBoss Tools Java Standard Tools   3.3.0.v20120504-2056-H66-Beta3  org.jboss.tools.jst.feature.feature.group   null
  JBoss Tools JDT Extensions    3.3.0.v20120510-2001-H58-Beta3  org.jboss.tools.common.jdt.feature.feature.group    JBoss by Red Hat
  JBoss Tools JSF   3.3.0.v20120504-0520-H88-Beta3  org.jboss.tools.jsf.feature.feature.group   JBoss by Red Hat
  JBoss Tools RichFaces 3.3.0.v20120504-0520-H88-Beta3  org.jboss.tools.richfaces.feature.feature.group JBoss by Red Hat
  JBoss Tools Source Lookup 1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.sourcelookup.feature.feature.group    JBoss by Red Hat
  JBoss Tools Usage Reporting   1.1.0.v20120504-2022-H52-Beta3  org.jboss.tools.usage.feature.feature.group JBoss by Red Hat
  JBoss Tools Visual Page Editor    3.3.0.v20120504-2124-H75-Beta3  org.jboss.tools.vpe.feature.feature.group   null
  JBoss WebServices Tools   1.2.2.v20120514-1752-H106-Beta3 org.jboss.tools.ws.feature.feature.group    JBoss by Red Hat
  JBossAS Tools 2.3.0.v20120504-2054-H105-Beta3 org.jboss.ide.eclipse.as.feature.feature.group  JBoss by Red Hat
  JMX Console   1.2.0.v20120504-0232-H50-Beta3  org.jboss.tools.jmx.feature.feature.group   JBoss by Red Hat
  m2e - Maven Integration for Eclipse   1.0.200.20111228-1245   org.eclipse.m2e.feature.feature.group   Eclipse.org - m2e
  m2e - slf4j over logback logging (Optional)   1.0.200.20111228-1245   org.eclipse.m2e.logback.feature.feature.group   Eclipse.org - m2e
  Maven Integration for WTP 0.15.2.20120306-2040    org.maven.ide.eclipse.wtp.feature.feature.group JBoss by Red Hat
  Maven Profiles Management 1.3.0.v20120514-1625-H96-Beta3  org.jboss.tools.maven.profiles.feature.feature.group    JBoss by Red Hat
  Project Examples  1.2.1.v20120504-1659-H91-Beta3  org.jboss.tools.project.examples.feature.feature.group  JBoss by Red Hat
  Seam 3 Tools  1.2.0.v20120504-0314-H63-Beta3  org.jboss.tools.cdi.seam.feature.feature.group  JBoss by Red Hat
4

2 回答 2

2

我设法按照以下描述的步骤安装它:

  1. http://www.eclipse.org/m2e/download/

  2. http://help.eclipse.org/juno/index.jsp?topic=//org.eclipse.platform.doc.user/tasks/tasks-127.htm

于 2012-06-28T22:07:48.200 回答
1

我通过下载和安装“Java 开发人员的 Eclipse IDE” (即:不是EE 包)解决了这个问题。与 Eclipse 的 EE 版本不同,基本的 Java 版本内置了 m2e,并且开箱即用。首选项条目在那里,导入项目出现在菜单中,等等。

然后我刚刚从“Help -> Install new software...”安装了“Eclipse Java EE Developer tools”。我不知道它是否是一个完整的EE包,但EE的观点和我需要的工具都在那里。您可以将Eclipse EE 包列表与上面的纯 Java 版本列表进行比较,表明 EE 包具有以下附加功能包:

  • org.eclipse.datatools(数据工具)
  • org.eclipse.jpt(Java 持久性工具)
  • org.eclipse.jsf(JavaServer 面)
  • org.eclipse.jst(?似乎是 Web Tools Platform 的一部分和 core 的一部分?)
  • org.eclipse.pde(插件开发环境)
  • org.eclipse.rse(远程系统资源管理器)
  • org.eclipse.tm(目标管理终端)
  • org.eclipse.wst(看起来支持 XSL)
于 2012-06-08T15:30:41.813 回答