You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ashika Umanga Umangiliya <um...@gmail.com> on 2009/02/18 06:55:21 UTC
Recursive Dependency versions problem ?
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
Re: Recursive Dependency versions problem ?
Posted by Wayne Fay <wa...@gmail.com>.
> 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 ?
Try running "mvn clean" and then "mvn package" again.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Recursive Dependency versions problem ?
Posted by Stefan Seidel <ss...@vub.de>.
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 <um...@gmail.com> 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. sseidel@vub.de
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org