Hi Stefan, Please read pg 57 & 58 of Better Builds with Maven (3.6 Resolving dependency conflicts and using version ranges).
Essentially, you have one of two options. You can exclude it from Wicket. For example <dependencies> <dependency> <groupId>Wicket</groupId> <artifactId>Wicket</artifactId> <version>2.0</version> <exclusions> <exclusion> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> </exclusion> </exclusions> </dependency> </dependencies> The drawback in the above approach is that, if you include a new jar file that is dependent on commons-collections 3.0 your build will break. The example below will work for all current and future release. <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>[3.2,)</version> </dependency> It is preferable to include the above dependency in your parent POM to ensure that this is reflected in all your projects. Thanks Lakshman > -----Original Message----- > From: Stefan Arentz [mailto:[EMAIL PROTECTED] > Sent: Saturday, 23 September 2006 10:31 PM > To: Maven Users List > Subject: Two dependencies depending on different versions of commons-collections > > I have two dependencies in my project that both depend on different > versions of commons-collections. > > OpenJPA -> commons-collections 3.2 > Wicket 2.0 -> commons-collections 2.1 > > Wicket seems to 'win' and commons-collections 2.1 is included. > Unfortunately this does not work for OpenJPA so I had to add a > dependency to commons-collections 3.1 to my project. That seemed to > override the choice. > > Is there a better way to do this? If I know that commons-collections > always guarantees backward compatibility, is it possible to change the > dependency in Wicket to 'commons collections 2.1 or higher' ? > > Can Maven2 do that and will that help resolving the right version in this case? > > S. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]