Osgi 在karaf中安装apachecxf

Osgi 在karaf中安装apachecxf,osgi,cxf,karaf,Osgi,Cxf,Karaf,我对运行在karaf 3.0.8上的sogi应用程序有一些问题。该应用程序具有以下依赖项: dependencies { compile 'org.apache.camel:camel-core:2.15.2' compile 'org.apache.camel:camel-cxf:2.15.2' compile 'org.slf4j:slf4j-api:1.7.12' testCompile group: 'junit', name: 'junit', version: '4

我对运行在karaf 3.0.8上的sogi应用程序有一些问题。该应用程序具有以下依赖项:

dependencies { 
  compile 'org.apache.camel:camel-core:2.15.2'
  compile 'org.apache.camel:camel-cxf:2.15.2'
  compile 'org.slf4j:slf4j-api:1.7.12'
  testCompile group: 'junit', name: 'junit', version: '4.11'
 }
当我试图在卡拉夫部署它时,它说:

org.osgi.framework.BundleException: Unresolved constraint in bundle
foobar.it.osgi.status.osgi-status [863]: Unable to resolve 863.1:
missing   requirement [863.1] osgi.wiring.package; 
(&(osgi.wiring.package=javax.ws.rs)(version>=2.0.0)(!(version>=3.0.0)))
我试过这个:

feature:repo-add mvn:org.apache.cxf.karaf/apache-cxf/3.0.4/xml/feature

feature:install cxf
然后我得到这个错误:

Error executing command: Can't install feature cxf/0.0.0:   
No feature named 'jetty' with version '[7,10)' available

嗯,关于如何安装正确的软件包,有什么建议吗?谢谢。

我刚刚用karaf 3.0.8测试了CXF。我能够安装3.0.4、3.0.10和3.1.6版,没有任何问题

我不知道为什么会出现错误,因为karaf 3.0.8包含jetty 8。因此,在您指定的范围内应该有一个有效的特性


无论如何,我建议不要安装cxf 3.0.4。它已经过时了,因为该分支中的CXF版本已经是3.0.10。通常,您应该始终尝试安装最新的错误修复版本,因为它可能包含重要的修复,如安全问题。

复杂框架(cxf、camel等)与特定版本有许多复杂的依赖关系。卡拉夫本身就是一个空容器。也许您可以使用ApacheServiceMix(带cxf的Karaf、camel、activemq等等,所有这些都已安装并正在使用我们的box)或一些受支持的捆绑包(FuseESB、Talend ESB等等)。您可以为自己节省大量的时间和时间来解决正确的依赖关系。好提示!,使用ServiceMix效果更好。谢谢你的评论,我安装了ServiceMix,然后它似乎可以工作了。