代码之家  ›  专栏  ›  技术社区  ›  JasonPlutext

卡拉夫想要可选的进口货?

  •  0
  • JasonPlutext  · 技术社区  · 6 年前

    我试着用org.eclipse.persistence.moxy 2.7.4单位:Karaf。

    卡拉夫4.2.6说:

    Error executing command: Error executing command on bundles:
            Error starting bundle 71: Unable to resolve HelloWorld [71](R 71.0): missing requirement [HelloWorld [71](R 71.0)] osgi.wiring.package; (osgi.wiring.package=com.sun.codemodel) Unresolved requirements: [[HelloWorld [71](R 71.0)] osgi.wiring.package; (osgi.wiring.package=com.sun.codemodel)]
    

    Manifest-Version: 1.0
    Bundle-SymbolicName: org.eclipse.persistence.moxy
    Require-Bundle: org.eclipse.persistence.core;bundle-version="2.7.4";visibility:=reexport,org.eclipse.persistence.asm;bundle-version="7.0.0" ;resolution:=optional
    Bundle-ManifestVersion: 2
    Bundle-Vendor: Eclipse.org - EclipseLink Project
    Import-Package: com.sun.xml.bind;resolution:=optional,com.sun.xml.bind.annotation;resolution:=optional,com.sun.xml.bind.api;resolution:=optional,com.sun.xml.bind.api.impl;resolution:=optional,com.sun.codemodel;resolution:=optional;version="[2.2.11,3)"
    Bundle-Name: EclipseLink MOXy
    Bundle-Version: 2.7.4.v20190115-ad5b7c6b2a
    

    注意 com.sun.codemodel;resolution:=optional;version="[2.2.11,3)

    但上面写着“分辨率:=可选”。那么为什么这是一个未解决的需求,我如何让karaf将其视为可选的呢?

    0 回复  |  直到 6 年前
        1
  •  0
  •   Jonathan Schoreels    6 年前

    Import-Package 在你的 META-INF/MANIFEST.MF ,如果您使用maven bundle plugin,则可能会扫描依赖关系,因为pom.xml文件然后在你的 导入程序包

    推荐文章