【发布时间】:2017-01-19 13:48:19
【问题描述】:
我在 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'
}
当我尝试在 karaf 中部署它时,它说:
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
嗯,关于如何安装正确软件包的任何提示?谢谢。
【问题讨论】:
-
复杂的框架(cxf、camel、..)有许多复杂的依赖关系和特定的版本。 Karaf 本身就是一个空容器。也许您可以使用 Apache ServiceMix(带有 cxf、camel、activemq 的 Karaf ......全部安装并运行我们的盒子)或一些受支持的捆绑包(FuseESB、Talend ESB、......)。您可以在解决正确的依赖关系时省去很多麻烦和时间。
-
好提示!,使用 ServiceMix 效果更好。