camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: camel-test-spring
Date Thu, 19 Apr 2012 13:20:03 GMT
On Thu Apr 19 16:40:05 2012, Magnus Palmér wrote:
> It works when adding spring-context dependency 3.1.1 to my pom.

I just checked the code of camel-test-spring, if you are using the 
CamelSpringJUnit4ClassRunner, you need to use the Spring 3.1.1.
As the CamelSpringTestContextLoader doesn't support spring 3.0.x.

>
> What you are saying works for camel-test-spring since the spring
> dependencies are managed explicitly, maybe that is good practice?
> I am not that experienced with spring yet.
>
> Maybe it should say something about it in the wiki for spring test?

Yes, we should add some document for it.


> Den 19 apr 2012 03:31 skrev "Willem Jiang"<willem.jiang@gmail.com>:
>
>> There are compiling issue of camel-test-spring with spring 3.0.x, but it
>> should work by just applying the jar into the class path.
>> You can override  the spring version in your pom this time.
>>
>> On Thu Apr 19 05:23:07 2012, Magnus Palmér wrote:
>>
>>> In the camel-parent pom:
>>> <spring-version>3.0.7.RELEASE<**/spring-version>
>>>
>>> And in camel-test-spring pom:
>>> <spring-version>3.1.1.RELEASE<**/spring-version>
>>>
>>> Den 18 april 2012 23:12 skrev Magnus Palmér<magnus.palmer.work@**
>>> gmail.com<magnus.palmer.work@gmail.com>>:
>>>
>>>   I ran into some trouble today when I changed my JUnit test to use
>>>> @RunWith(**CamelSpringJUnit4ClassRunner.**class) from camel-spring-test
>>>>
>>>> It turned out that a transient dependency had resolved to:
>>>> org.springframework:spring-**beans:jar:3.0.7.RELEASE:**compile
>>>>
>>>> This one was correct however:
>>>> org.springframework:spring-**test:jar:3.1.1.RELEASE:test
>>>>
>>>> Looking at the dependency:tree for camel-spring and camel-test-spring
>>>>
>>>> +- org.apache.camel:camel-spring:**jar:2.10-SNAPSHOT:compile
>>>> |  +- org.springframework:spring-**context:jar:3.0.7.RELEASE:**compile
>>>> |  |  +- org.springframework:spring-**beans:jar:3.0.7.RELEASE:**compile
>>>> |  |  +- org.springframework:spring-**core:jar:3.0.7.RELEASE:compile
>>>> |  |  |  \- commons-logging:commons-**logging:jar:1.1.1:compile
>>>> |  |  +- org.springframework:spring-**expression:jar:3.0.7.RELEASE:**
>>>> compile
>>>> |  |  \- org.springframework:spring-**asm:jar:3.0.7.RELEASE:compile
>>>> |  +- org.springframework:spring-**aop:jar:3.0.7.RELEASE:compile
>>>> |  |  \- aopalliance:aopalliance:jar:1.**0:compile
>>>> |  \- org.springframework:spring-tx:**jar:3.0.7.RELEASE:compile
>>>>
>>>>   +- org.apache.camel:camel-test-**spring:jar:2.10-SNAPSHOT:test
>>>>   |  \- org.springframework:spring-**test:jar:3.1.1.RELEASE:test
>>>>
>>>> Is this how it is supposed to be?
>>>> I can get around it by adding the transient spring-dependencies for
>>>> camel-spring to be declared explicitly.
>>>> Or am I missing something?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Willem
>> ------------------------------**----
>> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
>> FuseSource
>> Web: http://www.fusesource.com
>> Blog:    http://willemjiang.blogspot.**com<http://willemjiang.blogspot.com>(English)
>>         http://jnn.javaeye.com (Chinese)
>> Twitter: willemjiang
>> Weibo: willemjiang
>>
>>
>



--
Willem
----------------------------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Mime
View raw message