Hi Charles and happy new year to you (and the others :)).

In ServiceMix, to avoid this kind of issue, we "override" the Camel feature descriptor in ServiceMix to align dependencies between all integrated projects.

I guess that we can achieve this kind of management using an OBR resolver. It's already planned in ServiceMix feature descriptor (but I haven't tested it), if it works fine, I will submit a patch to Camel.

Regards
JB

On 01/03/2011 03:17 PM, Charles Moulliard wrote:
Hi,

I see that we have a strict dependency between Camel and Karaf
projects because both projects use Spring. The side effect of that is
that we cannot install camel 2.5 on karaf 2.1.SNAPSHOT as it uses now
spring 3.0.5.RELEASE and camel 2.5 -->  spring 3.0.4.RELEASE. To be
able to use Camel on last version of Karaf, we should use Apache Camel
2.6.

charlesmoulli...@root>  features:install camel
Installing feature camel 2.5.0
Installing feature camel-core 2.5.0
Installing feature spring 3.0.4.RELEASE
Installing bundle
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_3
Installing bundle mvn:org.springframework/spring-asm/3.0.4.RELEASE
Installing bundle mvn:org.springframework/spring-aop/3.0.4.RELEASE
Installing bundle mvn:org.springframework/spring-aspects/3.0.4.RELEASE
Installing bundle mvn:org.springframework/spring-core/3.0.4.RELEASE
Installing bundle mvn:org.springframework/spring-beans/3.0.4.RELEASE
Installing bundle mvn:org.springframework/spring-context/3.0.4.RELEASE
Installing bundle mvn:org.springframework/spring-context-support/3.0.4.RELEASE
Installing bundle mvn:org.springframework/spring-expression/3.0.4.RELEASE
Installing bundle
mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/1.5.0
Installing bundle
mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.1/1.5.0
Installing bundle
mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/1.5.0
Installing bundle
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.1.13_1
Installing bundle mvn:org.fusesource.commonman/commons-management/1.0
Installing bundle mvn:org.apache.camel/camel-core/2.5.0
Installing feature camel-spring 2.5.0
Installing feature spring 3.0.4.RELEASE
Found installed bundle: org.apache.servicemix.bundles.aopalliance [171]
Found installed bundle: org.springframework.asm [172]
Found installed bundle: org.springframework.aop [173]
Found installed bundle: org.springframework.aspects [174]
Found installed bundle: org.springframework.core [175]
Found installed bundle: org.springframework.beans [176]
Found installed bundle: org.springframework.context [177]
Found installed bundle: org.springframework.context.support [178]
Found installed bundle: org.springframework.expression [179]
Installing feature spring-dm 1.2.0
Installing feature spring 3.0.5.RELEASE
Found installed bundle: org.springframework.osgi.core [167]
Found installed bundle: org.springframework.osgi.io [166]
Installing bundle
mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/2.1.99-SNAPSHOT
Found installed bundle: org.springframework.osgi.extensions.annotations [169]
Found installed bundle: org.springframework.osgi.extender [168]
Installing feature camel-core 2.5.0
Installing feature spring 3.0.4.RELEASE
Found installed bundle: org.apache.servicemix.bundles.aopalliance [171]
Found installed bundle: org.springframework.asm [172]
Found installed bundle: org.springframework.aop [173]
Found installed bundle: org.springframework.aspects [174]
Found installed bundle: org.springframework.core [175]
Found installed bundle: org.springframework.beans [176]
Found installed bundle: org.springframework.context [177]
Found installed bundle: org.springframework.context.support [178]
Found installed bundle: org.springframework.expression [179]
Found installed bundle: org.apache.servicemix.specs.activation-api-1.1 [180]
Found installed bundle: org.apache.servicemix.specs.jaxb-api-2.1 [181]
Found installed bundle: org.apache.servicemix.specs.stax-api-1.0 [182]
Found installed bundle: org.apache.servicemix.bundles.jaxb-impl [183]
Found installed bundle: commons-management [184]
Found installed bundle: org.apache.camel.camel-core [185]
Found installed bundle: org.apache.geronimo.specs.geronimo-jta_1.1_spec [87]
Installing bundle mvn:org.springframework/spring-tx/3.0.4.RELEASE
Installing bundle mvn:org.apache.camel/camel-spring/2.5.0
Error executing command: Could not start bundle
mvn:org.apache.camel/camel-spring/2.5.0 in feature(s)
camel-spring-2.5.0: Constraint violation for package
'org.springframework.core' when resolving module 187.0 between
existing import 175.0.org.springframework.core BLAMED ON [[187.0]
package; 
(&(package=org.springframework.core)(version>=2.5.0)(!(version>=4.0.0)))]
and uses constraint 152.0.org.springframework.core BLAMED ON [[187.0]
package; (&(package=org.apache.camel.view)(version>=2.5.0)(!(version>=2.5.1))),
[185.0] package;
(&(package=org.springframework.jmx.export.metadata)(version>=2.5.0)(!(version>=4.0.0))),
[149.0] package;
(&(package=org.springframework.core)(version>=3.0.5)(!(version>=3.0.6)))]


Is it what we would like for the future ? Why don't we remove Spring
feature from Camel feature file and uses the one provided by Apache
Karaf and add a range of version in camel manifest file ? This will
allow to support different version of Camel on Karaf but using range
of spring version from 3.0.x to ! 3.1.

Regards,

Charles Moulliard

Sr. Principal Solution Architect - FuseSource
Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard

Reply via email to