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

Reply via email to