0

我正在尝试安装一个依赖于 com.google.code.gson/gson/2.2.4 的包。但是,在启动捆绑包时,我收到以下消息:

Error executing command: Error starting bundles:  
  Unable to start bundle 242: Unresolved constraint in bundle gopressComponants 
  [242]: Unable to resolve 242.0: missing requirement [242.0] osgi.wiring.package; 
  (&(osgi.wiring.package=com.google.gson)(version>=2.2.0)(!(version>=3.0.0)))  

使用以下命令完成捆绑包安装:

install fab:mvn:com.audaxis.gopress/gopressComponants/0.0.2-SNAPSHOT

这是 MANIFEST.MF 文件的摘录:

Manifest-Version: 1.0
Bnd-LastModified: 1391018962398
Build-Jdk: 1.7.0_45
Built-By: david
Bundle-ManifestVersion: 2
Bundle-Name: Camel Checksum Component
Bundle-SymbolicName: gopressComponants
Bundle-Version: 0.0.2.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: com.audaxis.camel.gopress.utils;uses:="com.google.gson.stream,
  com.google.gson";version="0.0.2.SNAPSHOT"
Import-Package: com.google.gson;version="[2.2,3)",
   com.google.gson.stream;version="[2.2,3)"

gson jar 很好地位于本地 maven 存储库中。

任何想法,为什么不自动安装依赖项?

谢谢

4

0 回答 0