我们一直在jboss-fuse-6.2.1.redhat-084中使用骆驼版本2.15.1。 我需要在转换消息的路由中使用camel-protobuf 2.15.1(对protobuf-java 2.6.1的依赖)。同时,proto消息使用protobuf-java 3.0编译。
捆绑包清单包括:
Import-Package: org.apache.camel.dataformat.protobuf;version=" 2.15.0.3", com.google.protobuf;version="[3.0.0,3.1.0)"......
在这种情况下,我收到以下错误消息:
Uses constraint violation. Unable to resolve resource esb-route [esb-route/4.0.0] because it is exposed to package 'com.google.protobuf' from resources com.google.protobuf [com.google.protobuf/3.0.0] and com.google.protobuf [com.google.protobuf/2.6.1] via two dependency chains.
Chain 1:
esb-route [esb-route/4.0.0]
import: (&(osgi.wiring.package=com.google.protobuf)(version>=3.0.0)(!(version>=3.1.0)))
|
export: osgi.wiring.package: com.google.protobuf
com.google.protobuf [com.google.protobuf/3.0.0]
Chain 2:
esb-route [esb-route/4.0.0]
import: (&(osgi.wiring.package=org.apache.camel.dataformat.protobuf)(version>=2.15.0)(!(version>=3.0.0)))
|
export: osgi.wiring.package=org.apache.camel.dataformat.protobuf; uses:=com.google.protobuf
org.apache.camel.camel-protobuf [org.apache.camel.camel-protobuf/2.15.1.redhat-621084]
import: (&(osgi.wiring.package=com.google.protobuf)(version>=2.6.0)(!(version>=3.0.0)))
|
export: osgi.wiring.package: com.google.protobuf
com.google.protobuf [com.google.protobuf/2.6.1]
如何配置我的捆绑包,以便导入的camel-protobuf不使用protobuf-java 2.6.0但3.0?