You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "steven.marcus" <st...@gmail.com> on 2007/12/23 04:46:11 UTC

pom dependency on "spring" instead of "spring-context" et al.

Both camel-core and camel-spring declare dependencies on the fully bundled
"spring" jar.

This precludes using spring-javaconfig-1.0m3-snapshot (or any other similar
project) because it declares dependencies on the smaller unbundled jars like
"spring-context" and the project winds up with multiple copies of the same
classes, and in the worst case, even with different versions of the same
classes.

I don't know if this just reveals that I don't understand maven fully, or if
it is a real problem.
But, I suspect the osgi support in both spring and camel will also be
improved by using the unbundled jars.

Can camel switch to declaring dependencies on the unbundled jars?

Also, I don't know if the changes made between 2.0 and 2.1/2.5 have any
impact on camel switching to the unbundled jars. But here is a link that
outlines them.
http://blog.interface21.com/main/2007/06/01/infrastructure-changes-in-spring-21-m2/

thanks in advance,
Steven Marcus



-- 
View this message in context: http://www.nabble.com/pom-dependency-on-%22spring%22-instead-of-%22spring-context%22-et-al.-tp14475572s22882p14475572.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: pom dependency on "spring" instead of "spring-context" et al.

Posted by Guillaume Nodet <gn...@gmail.com>.
I tend to agree with you.  When using maven, it becomes much more easier to
work with, and when not, you can simply include the spring jar and
everything will work.
Can you raise a JIRA for that ?

On Dec 28, 2007 1:34 PM, steven.marcus <st...@gmail.com> wrote:

>
> Thanks for the reply -- I didn't know about the ability to exclude
> selected
> dependencies in my pom.
>
> I still think it "better" if camel switched to declaring dependencies on
> the
> finer grained spring modules and hope a "camel-master" can tell me whether
> this might happen.
>
> thanks again,
> Steven Marcus
> --
> View this message in context:
> http://www.nabble.com/pom-dependency-on-%22spring%22-instead-of-%22spring-context%22-et-al.-tp14475572s22882p14525297.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: pom dependency on "spring" instead of "spring-context" et al.

Posted by "steven.marcus" <st...@gmail.com>.
Thanks for the reply -- I didn't know about the ability to exclude selected
dependencies in my pom.

I still think it "better" if camel switched to declaring dependencies on the
finer grained spring modules and hope a "camel-master" can tell me whether
this might happen.

thanks again,
Steven Marcus
-- 
View this message in context: http://www.nabble.com/pom-dependency-on-%22spring%22-instead-of-%22spring-context%22-et-al.-tp14475572s22882p14525297.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: pom dependency on "spring" instead of "spring-context" et al.

Posted by Jason Anderson <xd...@maxexp.com>.
I run into this quite often with various projects that use spring...
It'd be nice if maven supported some way to say that the main spring
project provided all the dependencies of the sub modules

while not the best solution I generally just throw a <exclusions>
element on the dependency thats bringing in the tree I don't want -
eg:

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-spring</artifactId>
  <version>...</version>
  <exclusions>
    <exclusion>
      <groupId>org.springframework</groupId>
      <artifactId>spring</artifactId>
    </exclusions>
</dependency>

you also need to make sure  you have a dependency on all the needed
functionality somewhere else so its prolly easier in your case to
actually exclude the small submodule jars from the javaconfig
dependency and just use the main spring 2.x dependency that covers all
the submodule functionality


this is generally easier than trying to convince everyone in the world
to use a dependency on the main spring jar or the separate modules

Cheers,
Jason


On Dec 22, 2007 7:46 PM, steven.marcus <st...@gmail.com> wrote:
>
> Both camel-core and camel-spring declare dependencies on the fully bundled
> "spring" jar.
>
> This precludes using spring-javaconfig-1.0m3-snapshot (or any other similar
> project) because it declares dependencies on the smaller unbundled jars like
> "spring-context" and the project winds up with multiple copies of the same
> classes, and in the worst case, even with different versions of the same
> classes.
>
> I don't know if this just reveals that I don't understand maven fully, or if
> it is a real problem.
> But, I suspect the osgi support in both spring and camel will also be
> improved by using the unbundled jars.
>
> Can camel switch to declaring dependencies on the unbundled jars?
>
> Also, I don't know if the changes made between 2.0 and 2.1/2.5 have any
> impact on camel switching to the unbundled jars. But here is a link that
> outlines them.
> http://blog.interface21.com/main/2007/06/01/infrastructure-changes-in-spring-21-m2/
>
> thanks in advance,
> Steven Marcus
>
>
>
> --
> View this message in context: http://www.nabble.com/pom-dependency-on-%22spring%22-instead-of-%22spring-context%22-et-al.-tp14475572s22882p14475572.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>