I got it. If our user use camel-test-spring, he will likely do it by annotating it with CamelSpringJUnit4ClassRunner or by extending CamelSpringTestSupport. For the first case, he needs spring-test, but not for the second one.
If we didn't had to use Spring 3.1.x for this (say Spring 3.0.x would also work), we would define the dependency to spring-test, also if we need it only for case one. Because I cannot see any issue to declare the dependency to spring-test 3.1.x., I would like to leave it as it is. Otherwise our users have to care about it, if they want to use CamelSpringJUnit4ClassRunner. In addition, we have to remember to change the scope back in Camel 3.0.0 or 2.11.0 from provided to compile... Best, Christian 2012/4/25 Magnus Palmér <magnus.palmer.w...@gmail.com> > I don't have an issue with it since I found the work-around. > It is more that it took me a couple of hours to figure it out (probably > some of it due to inexperience since I first thought I had a problem with > my application-context). > And is Willem says it is an intermediate problem that will go away once you > upgrade the rest to use the same version. > > > Den 25 april 2012 00:42 skrev Christian Müller < > christian.muel...@gmail.com> > : > > > Sorry, forget my last comment... > > I think we should let it is as it is. > > > > I created a sample application which depends on camel-sql and > > camel-test-spring. The dependency tree looks like below (dependency to > > org.springframework:spring-test:3.1.1.RELEASE): > > > > [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ > > loadbalancer-test --- > > [INFO] org.apache.cmueller.camel:loadbalancer-test:jar:0.0.1-SNAPSHOT > > [INFO] +- org.apache.camel:camel-sql:jar:2.10-SNAPSHOT:compile > > [INFO] | +- org.apache.camel:camel-core:jar:2.10-SNAPSHOT:compile > > [INFO] | | \- org.slf4j:slf4j-api:jar:1.6.4:compile > > [INFO] | \- org.springframework:spring-jdbc:jar:3.0.7.RELEASE:compile > > [INFO] | +- > org.springframework:spring-beans:jar:3.0.7.RELEASE:compile > > [INFO] | +- org.springframework:spring-core:jar:3.0.7.RELEASE:compile > > [INFO] | | +- > org.springframework:spring-asm:jar:3.0.7.RELEASE:compile > > [INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile > > [INFO] | \- org.springframework:spring-tx:jar:3.0.7.RELEASE:compile > > [INFO] | +- aopalliance:aopalliance:jar:1.0:compile > > [INFO] | +- > org.springframework:spring-aop:jar:3.0.7.RELEASE:compile > > [INFO] | \- > > org.springframework:spring-context:jar:3.0.7.RELEASE:compile > > [INFO] | \- > > org.springframework:spring-expression:jar:3.0.7.RELEASE:compile > > [INFO] +- org.apache.camel:camel-test-spring:jar:2.10-SNAPSHOT:test > > [INFO] | +- org.apache.camel:camel-test:jar:2.10-SNAPSHOT:test > > [INFO] | | \- junit:junit:jar:4.10:test > > [INFO] | | \- org.hamcrest:hamcrest-core:jar:1.1:test > > [INFO] | +- org.apache.camel:camel-spring:jar:2.10-SNAPSHOT:test > > [INFO] | \- org.springframework:spring-test:jar:3.1.1.RELEASE:test > > [INFO] \- org.slf4j:slf4j-log4j12:jar:1.6.4:test > > [INFO] \- log4j:log4j:jar:1.2.16:test > > > > > > If we declare the dependency to > > "org.springframework:spring-test:jar:3.1.1.RELEASE" in camel-test-spring > as > > provided, my dependency tree looks like this (no dependency to > > org.springframework:spring-test at all): > > > > [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ > > loadbalancer-test --- > > [INFO] org.apache.cmueller.camel:loadbalancer-test:jar:0.0.1-SNAPSHOT > > [INFO] +- org.apache.camel:camel-sql:jar:2.10-SNAPSHOT:compile > > [INFO] | +- org.apache.camel:camel-core:jar:2.10-SNAPSHOT:compile > > [INFO] | | \- org.slf4j:slf4j-api:jar:1.6.4:compile > > [INFO] | \- org.springframework:spring-jdbc:jar:3.0.7.RELEASE:compile > > [INFO] | +- > org.springframework:spring-beans:jar:3.0.7.RELEASE:compile > > [INFO] | +- org.springframework:spring-core:jar:3.0.7.RELEASE:compile > > [INFO] | | +- > org.springframework:spring-asm:jar:3.0.7.RELEASE:compile > > [INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile > > [INFO] | \- org.springframework:spring-tx:jar:3.0.7.RELEASE:compile > > [INFO] | +- aopalliance:aopalliance:jar:1.0:compile > > [INFO] | +- > org.springframework:spring-aop:jar:3.0.7.RELEASE:compile > > [INFO] | \- > > org.springframework:spring-context:jar:3.0.7.RELEASE:compile > > [INFO] | \- > > org.springframework:spring-expression:jar:3.0.7.RELEASE:compile > > [INFO] +- org.apache.camel:camel-test-spring:jar:2.10-SNAPSHOT:test > > [INFO] | +- org.apache.camel:camel-test:jar:2.10-SNAPSHOT:test > > [INFO] | | \- junit:junit:jar:4.10:test > > [INFO] | | \- org.hamcrest:hamcrest-core:jar:1.1:test > > [INFO] | \- org.apache.camel:camel-spring:jar:2.10-SNAPSHOT:test > > [INFO] \- org.slf4j:slf4j-log4j12:jar:1.6.4:test > > [INFO] \- log4j:log4j:jar:1.2.16:test > > > > In case one, it will work out of the box without the need for the user to > > declare the dependency to org.springframework:spring-test. It's done by > > Maven and it's what the user expect, IMO. They may have to exclude the > > dependency to org.springframework:spring-test:3.1.1.RELEASE and to > include > > the dependency to org.springframework:spring-test:3.0.7.RELEASE if they > > want to test with this version explicitly (no real need for this). > > > > In case two, the user has to define the dependency to > > org.springframework:spring-test:3.x.y.RELEASE to get this working. I > think > > this is not what a Maven user expect to do. > > > > @Magnus: Do you have a real issue or did you just wondering about the > > different Spring versions? > > > > Best, > > Christian > > >