You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Farrukh Najmi <fa...@wellfleetsoftware.com> on 2008/08/25 21:40:15 UTC
How to cope with conflicting jar versions
In my project there are many direct and indirect dependencies at the
lowest level on springframework jars.
One such dependency requires use of the most recent springframework
jars. Migrating to latest version of spring is my projects direct
dependency causes
problems at runtime with other dependencies which expect older versions
of apis from spring and its dependencies.
Is there a good way to deal with this dependency hell? If so I would
appreciate any advice. Thanks.
--
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to cope with conflicting jar versions
Posted by Michael McCallum <gh...@apache.org>.
thirdly version ranges give you deterministic and manageable conflicts.
however in the case of spring you should not be mixing the different major
revisions that will just give you headaches... use one or the other
1.2.X not compatible with 2.0.X not compatible with 2.5.X, i use version
ranges to ensure that no projects cross pollinate... if they do one has to go
up or the other down to get a deterministic result.
On Tue, 26 Aug 2008 16:06:51 Geoffrey Wiseman wrote:
> On Mon, Aug 25, 2008 at 3:40 PM, Farrukh Najmi <
>
> farrukh@wellfleetsoftware.com> wrote:
> > In my project there are many direct and indirect dependencies at the
> > lowest level on springframework jars.
> > One such dependency requires use of the most recent springframework jars.
> > Migrating to latest version of spring is my projects direct dependency
> > causes
> > problems at runtime with other dependencies which expect older versions
> > of apis from spring and its dependencies.
> >
> > Is there a good way to deal with this dependency hell? If so I would
> > appreciate any advice. Thanks.
>
> Generally, if a project closer to the root pom (fewer number of transitive
> dependencies away) calls for a version of the same dependency (same group
> id, artifact id) as a dependency farther away (greater number of transitive
> dependency hops), the former will be used to the exclusion of the latter,
> as I understand it. I find this solves the vast majority of the problems
> right there.
>
> A secondary mechanism is dependency management, where you can lock in
> versions of dependencies using the POM. I find this primarily useful at
> not requiring versions to be specified in sub-projects with a master POM.
>
> Finally, when you have issues where an artifact has been moved/renamed you
> may need to get into exclusions.
>
> - Geoffrey
--
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to cope with conflicting jar versions
Posted by Geoffrey Wiseman <ge...@gmail.com>.
On Mon, Aug 25, 2008 at 3:40 PM, Farrukh Najmi <
farrukh@wellfleetsoftware.com> wrote:
>
> In my project there are many direct and indirect dependencies at the lowest
> level on springframework jars.
> One such dependency requires use of the most recent springframework jars.
> Migrating to latest version of spring is my projects direct dependency
> causes
> problems at runtime with other dependencies which expect older versions of
> apis from spring and its dependencies.
>
> Is there a good way to deal with this dependency hell? If so I would
> appreciate any advice. Thanks.
>
Generally, if a project closer to the root pom (fewer number of transitive
dependencies away) calls for a version of the same dependency (same group
id, artifact id) as a dependency farther away (greater number of transitive
dependency hops), the former will be used to the exclusion of the latter, as
I understand it. I find this solves the vast majority of the problems right
there.
A secondary mechanism is dependency management, where you can lock in
versions of dependencies using the POM. I find this primarily useful at not
requiring versions to be specified in sub-projects with a master POM.
Finally, when you have issues where an artifact has been moved/renamed you
may need to get into exclusions.
- Geoffrey
--
Geoffrey Wiseman
Re: How to cope with conflicting jar versions
Posted by Brett Porter <br...@gmail.com>.
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
2008/8/26 Farrukh Najmi <fa...@wellfleetsoftware.com>:
>
>
> Thanks Brett,
>
> Can you please share any links or hints or how to use the new
> dependencyManagement feature introduced in maven 2.0.9.
>
>
> Brett Porter wrote:
>>
>> in most recent versions of Maven, dependencyManagement can be used to
>> enforce a particular version throughout the entire tree.
>>
>> You can also use the enforcer plugin to ensure this has been properly
>> applied.
>>
>> Cheers,
>> Brett
>>
>> 2008/8/26 Farrukh Najmi <fa...@wellfleetsoftware.com>:
>>>
>>> In my project there are many direct and indirect dependencies at the
>>> lowest
>>> level on springframework jars.
>>> One such dependency requires use of the most recent springframework jars.
>>> Migrating to latest version of spring is my projects direct dependency
>>> causes
>>> problems at runtime with other dependencies which expect older versions
>>> of
>>> apis from spring and its dependencies.
>>>
>>> Is there a good way to deal with this dependency hell? If so I would
>>> appreciate any advice. Thanks.
>>>
>>
>
> --
> View this message in context: http://www.nabble.com/How-to-cope-with-conflicting-jar-versions-tp19150279p19153947.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Brett Porter
Blog: http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to cope with conflicting jar versions
Posted by Farrukh Najmi <fa...@wellfleetsoftware.com>.
Thanks Brett,
Can you please share any links or hints or how to use the new
dependencyManagement feature introduced in maven 2.0.9.
Brett Porter wrote:
>
> in most recent versions of Maven, dependencyManagement can be used to
> enforce a particular version throughout the entire tree.
>
> You can also use the enforcer plugin to ensure this has been properly
> applied.
>
> Cheers,
> Brett
>
> 2008/8/26 Farrukh Najmi <fa...@wellfleetsoftware.com>:
>>
>> In my project there are many direct and indirect dependencies at the
>> lowest
>> level on springframework jars.
>> One such dependency requires use of the most recent springframework jars.
>> Migrating to latest version of spring is my projects direct dependency
>> causes
>> problems at runtime with other dependencies which expect older versions
>> of
>> apis from spring and its dependencies.
>>
>> Is there a good way to deal with this dependency hell? If so I would
>> appreciate any advice. Thanks.
>>
>
--
View this message in context: http://www.nabble.com/How-to-cope-with-conflicting-jar-versions-tp19150279p19153947.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to cope with conflicting jar versions
Posted by Brett Porter <br...@gmail.com>.
in most recent versions of Maven, dependencyManagement can be used to
enforce a particular version throughout the entire tree.
You can also use the enforcer plugin to ensure this has been properly applied.
Cheers,
Brett
2008/8/26 Farrukh Najmi <fa...@wellfleetsoftware.com>:
>
> In my project there are many direct and indirect dependencies at the lowest
> level on springframework jars.
> One such dependency requires use of the most recent springframework jars.
> Migrating to latest version of spring is my projects direct dependency
> causes
> problems at runtime with other dependencies which expect older versions of
> apis from spring and its dependencies.
>
> Is there a good way to deal with this dependency hell? If so I would
> appreciate any advice. Thanks.
>
> --
> Regards,
> Farrukh Najmi
>
> Web: http://www.wellfleetsoftware.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Brett Porter
Blog: http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org