Maven OSGi アプリ (NetBeans 内) に問題があります。
application
、utils
およびの 3 つの OSGi バンドルがあり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
(view
ただし、依存関係を維持する場合) は正常に実行されます (エラーなし)。