You should look at the <exclusions> tag for dependencies[1]. Using this, you can exclude commons-collections from the ZK framework dependency.
Stefan [1] http://maven.apache.org/pom.html#Exclusions On Wed, 18 Feb 2009 14:55:21 +0900 Ashika Umanga Umangiliya <[email protected]> wrote: > Greetings all, > > > Here is the scenario: > > I have two projects > > 1) homology : uses Velocty 1.5 as a dependency in POM. (Velocity 1.5 has > **commons-collections-3.1** in dependency list) > > 2) Mysizouka (a web application) : Has ZK webframework in dependency (ZK has > **commons-collections-2.1 in dependency list > > : Mysizouka uses 'homology' > as a dependency. > > First, when I build WAR, 'lib' folder contained the > 'commons-collections-2.1' which comes from ZK.So application gave a > java.lang.NoClassDefFoundError: org/apache/commons/collections/map/LRUMap, > because Velocity needs 3.1. > > Then in Mysizouka POM I added 'commons-collections-3.1' in the dependency > list. > Now when I build the WAR is contains both 'commons-collections-3.1' and > 'commons-collections-2.1' ?? > How to resolve this? I only need 1.3 ? > ------------------------------------------ > Here an illustration to show the scenario: > > > homology --> needs Velocity 1.5 ------------->uses commons-collections-3.1 > > MySizouka --> needs ZK framework -----------> uses commons-collections-2.1 > |---- -> needs 'homology' ~~~Velocity~~> need commons-collections-3.1 -- Mit freundlichen Grüßen, Stefan Seidel Software-Entwickler ________________________ VUB Printmedia GmbH Chopinstraße 4, 04103 Leipzig tel. +49 (341) 9 60 50 93 fax. +49 (341) 9 60 50 92 mail. [email protected] web. www.vub.de HRB Köln 24015 UStID DE 122 649 251 GF Dr. Achim Preuss Neudorf, Dr. Christian Preuss Neudorf --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
