理解使用约束违规

时间:2020-08-04 03:10:31

标签: eclipse plugins eclipse-plugin osgi rcp

我正在尝试构建RCP应用程序,并且我一直在逐步添加捆绑和依赖项,以使其具有所需功能的更多内容。在通过发布测试我的产品时,我得到以下使用约束违例的信息,我不确定为什么会这样。我的产品中包含以下捆绑软件:org.eclipse.epp.mpc.core.win32com.sun.jna.platformorg.apache.http.client

有人可以帮我解释一下这里发生了什么,我怎么可能去解决这个问题?

  Bundle was not resolved because of a uses contraint violation.
  org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.epp.mpc.core.win32 [osgi.identity; osgi.identity="org.eclipse.epp.mpc.core.win32"; type="osgi.bundle"; version:Version="1.7.1.v20180628-1139"; singleton:="true"] because it is exposed to package 'com.sun.jna.platform.win32' from resources com.sun.jna.platform [osgi.identity; osgi.identity="com.sun.jna.platform"; type="osgi.bundle"; version:Version="4.1.0.v20170410-1117"] and org.apache.http.client [osgi.identity; osgi.identity="org.apache.http.client"; type="osgi.bundle"; version:Version="4.5.0.v20181221_2153"] via two dependency chains.

Chain 1:
  org.eclipse.epp.mpc.core.win32 [osgi.identity; osgi.identity="org.eclipse.epp.mpc.core.win32"; type="osgi.bundle"; version:Version="1.7.1.v20180628-1139"; singleton:="true"]
    import: (&(osgi.wiring.package=com.sun.jna.platform.win32)(version>=4.1.0))
     |
    export: osgi.wiring.package: com.sun.jna.platform.win32
  com.sun.jna.platform [osgi.identity; osgi.identity="com.sun.jna.platform"; type="osgi.bundle"; version:Version="4.1.0.v20170410-1117"]

Chain 2:
  org.eclipse.epp.mpc.core.win32 [osgi.identity; osgi.identity="org.eclipse.epp.mpc.core.win32"; type="osgi.bundle"; version:Version="1.7.1.v20180628-1139"; singleton:="true"]
    import: (&(osgi.wiring.package=org.apache.http.impl.auth.win)(version>=4.3.6))
     |
    export: osgi.wiring.package: org.apache.http.impl.auth.win; uses:=com.sun.jna.platform.win32
    export: osgi.wiring.package=com.sun.jna.platform.win32
  org.apache.http.client [osgi.identity; osgi.identity="org.apache.http.client"; type="osgi.bundle"; version:Version="4.5.0.v20181221_2153"]
    at org.eclipse.osgi.container.Module.start(Module.java:444)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1682)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1661)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1624)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1555)
    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)

0 个答案:

没有答案