Jörg Schaible schrieb:

Christian Schulte wrote on Monday, December 05, 2005 12:13 PM:


Christian Schulte schrieb:


Hi,

when I build an ear file with maven 2 it happens that because of
transitive dependencies I get e.g. two struts.jar files in the
generated file. What is the recommended way of managing transitive
dependencies ? Say I have a dependency which itself has a dependency
to struts-1.2.7.jar and another dependency which itself has a
dependency to struts-1.2.8.jar I would like to avoid having both
struts versions in the generated ear file. What is the recommended
way of doing this ?

Really noone any hint or best-practice advice ?


Use a dependencyManagement section, where you define the version to use and do 
define your dependencies without a version requirement.

Thanks for the answer. The problem is the transitive dependencies. What I am currently doing is run maven with -X and grep for a message where it says that an earlier version overrides a current version in the dependency graph. If somehow the later version in the graph is higher than the earlier one I try to find out which dependency introduces the lower version and add an exclusion to this artifact. So there is really no way to get that done automatically ? No way to automatically resolve such conflicting versions ? When I specify the version to use in the dependencyManagement section it is ignored for transitive dependencies. Is that the Jira issue you were talking about ?

--
Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to