OSGi Maven:缺少要求osgi.wiring.package

时间:2013-10-29 21:26:13

标签: java maven netbeans osgi

我遇到Maven OSGi应用程序(在NetBeans中)的问题。

我有3个OSGi包:applicationutilsview

  • 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中不使用view中的任何内容(但保留依赖关系)时,它运行正常(没有错误)。

0 个答案:

没有答案