在Eclipse Luna

时间:2016-03-18 04:26:14

标签: java eclipse spring git maven

重现步骤: 1.从http://www.eclipse.org/downloads/

下载Eclipse luna sr2包
  1. 额外打开eclipse IDE

  2. 点击菜单帮助 - > Eclipse Marketplace - >搜索春天' - >点击Eclipse的Spring Tool Suite(STS)3.7.7RELEASE' - >点击“安装'

  3. Spring安装完成后重新启动eclipse IDE

  4. git和maven坏了。

  5. 我在错误日志中复制了一些错误:

    1)org.eclipse.egit.ui中的FrameworkEvent ERROR

    eclipse.buildId=4.4.2.M20150204-1700
    java.version=1.7.0_51
    java.vendor=Oracle Corporation
    BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_NZ
    Framework arguments:  -product org.eclipse.epp.package.java.product
    Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product
    
    org.eclipse.mylyn.git.ui
    Error
    Fri Mar 18 17:16:34 NZDT 2016
    FrameworkEvent ERROR
    
    org.osgi.framework.BundleException: Could not resolve module: org.eclipse.mylyn.git.ui [269]
      Unresolved requirement: Require-Bundle: org.eclipse.egit.ui
        -> Bundle-SymbolicName: org.eclipse.egit.ui; bundle-version="4.2.0.201601211800-r"; singleton:="true"
           org.eclipse.egit.ui [458]
             No resolution report for the bundle.  Bundle was not resolved because of a uses contraint violation.
      org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.egit.ui [osgi.identity; osgi.identity="org.eclipse.egit.ui"; type="osgi.bundle"; version:Version="4.2.0.201601211800-r"; singleton:="true"] because it is exposed to package 'com.jcraft.jsch' from resources com.jcraft.jsch [osgi.identity; osgi.identity="com.jcraft.jsch"; type="osgi.bundle"; version:Version="0.1.53.v201508180515"] and com.jcraft.jsch [osgi.identity; osgi.identity="com.jcraft.jsch"; type="osgi.bundle"; version:Version="0.1.51.v201410302000"] via two dependency chains.
    
    Chain 1:
      org.eclipse.egit.ui [osgi.identity; osgi.identity="org.eclipse.egit.ui"; type="osgi.bundle"; version:Version="4.2.0.201601211800-r"; singleton:="true"]
        require: (&(osgi.wiring.bundle=com.jcraft.jsch)(&(bundle-version>=0.1.37)(!(bundle-version>=0.2.0))))
         |
        provide: osgi.wiring.bundle: com.jcraft.jsch
      com.jcraft.jsch [osgi.identity; osgi.identity="com.jcraft.jsch"; type="osgi.bundle"; version:Version="0.1.53.v201508180515"]
    
    Chain 2:
      org.eclipse.egit.ui [osgi.identity; osgi.identity="org.eclipse.egit.ui"; type="osgi.bundle"; version:Version="4.2.0.201601211800-r"; singleton:="true"]
        require: (&(osgi.wiring.bundle=org.eclipse.jsch.core)(&(bundle-version>=1.1.100)(!(bundle-version>=2.0.0))))
         |
        provide: osgi.wiring.bundle; osgi.wiring.bundle="org.eclipse.jsch.core"; bundle-version:Version="1.1.500.v20131112-1442"; singleton:="true"
      org.eclipse.jsch.core [osgi.identity; osgi.identity="org.eclipse.jsch.core"; type="osgi.bundle"; version:Version="1.1.500.v20131112-1442"; singleton:="true"]
        require: (&(osgi.wiring.bundle=com.jcraft.jsch)(&(bundle-version>=0.1.50)(!(bundle-version>=1.0.0))))
         |
        provide: osgi.wiring.bundle: com.jcraft.jsch
      com.jcraft.jsch [osgi.identity; osgi.identity="com.jcraft.jsch"; type="osgi.bundle"; version:Version="0.1.51.v201410302000"]
        at org.eclipse.osgi.container.Module.start(Module.java:434)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
    

    2)FrameworkEvent ERROR

    eclipse.buildId=4.4.2.M20150204-1700
    java.version=1.7.0_51
    java.vendor=Oracle Corporation
    BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_NZ
    Framework arguments:  -product org.eclipse.epp.package.java.product
    Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product
    
    org.eclipse.m2e.core
    Error
    Fri Mar 18 17:16:34 NZDT 2016
    FrameworkEvent ERROR
    
    org.osgi.framework.BundleException: Could not resolve module: org.eclipse.m2e.core [479]
      Unresolved requirement: Require-Bundle: org.eclipse.m2e.maven.runtime; bundle-version="[1.7.0,1.8.0)"
        -> Bundle-SymbolicName: org.eclipse.m2e.maven.runtime; bundle-version="1.7.0.20160202-2118"; singleton:="false"
           org.eclipse.m2e.maven.runtime [491]
             Unresolved requirement: Require-Bundle: org.eclipse.m2e.maven.runtime.slf4j.simple; bundle-version="[1.7.0,1.8.0)"
               -> Bundle-SymbolicName: org.eclipse.m2e.maven.runtime.slf4j.simple; bundle-version="1.7.0.20160202-2118"; singleton:="false"
                  org.eclipse.m2e.maven.runtime.slf4j.simple [492]
                    Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"
    
        at org.eclipse.osgi.container.Module.start(Module.java:434)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
    

1 个答案:

答案 0 :(得分:2)

当我将eclipse二进制文件从一台机器复制到另一台机器时,我在eclipse中发现了与Maven插件相同类型的问题。

  

org.osgi.framework.BundleException:无法解析模块:org.eclipse.m2e.core [479]     未解决的要求:Require-Bundle:org.eclipse.m2e.maven.runtime;捆绑版本=" [1.7.0,1.8.0)"        - > Bundle-SymbolicName:org.eclipse.m2e.maven.runtime;捆绑版本=" 1.7.0.20160202-2118&#34 ;;单:="假"          org.eclipse.m2e.maven.runtime [491]            未解决的要求:Require-Bundle:org.eclipse.m2e.maven.runtime.slf4j.simple;捆绑版本=" [1.7.0,1.8.0)"               - > Bundle-SymbolicName:org.eclipse.m2e.maven.runtime.slf4j.simple;捆绑版本=" 1.7.0.20160202-2118&#34 ;;单:="假"                 org.eclipse.m2e.maven.runtime.slf4j.simple [492]                   未解决的要求:要求能力:osgi.ee;滤波器:="(及(osgi.ee = JavaSE的)(版本= 1.8))"

原因是新机器上的JDK7。当我在 eclipse.ini 中指出JDK8时,这个问题就解决了。