我对 Maven OSGi 应用程序(在 NetBeans 中)有疑问。
我有 3 个 OSGi 包application
:utils
和view
.
application
进口view
view
进口utils
该应用程序编译得很好,但是当我想运行它时,它没有以下输出消息:
Unable to resolve 3.0: missing requirement [3.0] osgi.wiring.package; (&(osgi.wiring.package=org.lib.view)(version>=1.0.0)(!(version>=2.0.0))))
整个错误消息:
[java] Auto-properties start: file:/C:/Users/volek/Desktop/library_parent/view/target/classes/ (org.osgi.framework.BundleException: Unable to cache bundle: file:/C:/Users/volek/Desktop/library_parent/view/target/classes/ - java.util.zip.ZipException: error in opening zip file)
[java] ERROR: Bundle org.lib.application [3] Error starting file:/C:/Users/volek/Desktop/library_parent/application/target/application-1.0-SNAPSHOT.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.lib.application [3]: Unable to resolve 3.0: missing requirement [3.0] osgi.wiring.package; (&(osgi.wiring.package=org.lib.view)(version>=1.0.0)(!(version>=2.0.0))))
[java] Auto-properties start: file:/C:/Users/volek/Desktop/library_parent/utils/target/classes/ (org.osgi.framework.BundleException: Unable to cache bundle: file:/C:/Users/volek/Desktop/library_parent/utils/target/classes/ - java.util.zip.ZipException: error in opening zip file)
[java] org.osgi.framework.BundleException: Unresolved constraint in bundle org.lib.application [3]: Unable to resolve 3.0: missing requirement [3.0] osgi.wiring.package; (&(osgi.wiring.package=org.lib.view)(version>=1.0.0)(!(version>=2.0.0)))
[java] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
[java] at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
[java] at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
[java] at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
[java] at java.lang.Thread.run(Thread.java:744)
整个输出: http: //pastebin.com/KBWSXfCT
奇怪的是,当我不使用utils
in 中的任何东西view
(但保留依赖项)时,它运行良好(没有错误)。