leetgeezer wrote:
>
> Hi list,
> Let me describe my problem by example.
> I have a dependency on Spring 2.1-m2 (one big jar) and Acegi security
> 1.0.4.
>
> The problem is that Acegi depends on various parts of Spring 2.0.4 (single
> component jars). Of course it works without any problems w/2.1-m2 version.
>
> At the end of the day, I have spring-2.1-m2.jar (which is ok) but also
> some unneeded 2.0.4 jars cluttering my lib/ directory due to the acegi
> dependency.
>
> Is it possible to avoid this situation and somehow force not to include
> Acegi's dependent libraries? Or maybe you have another way to solbe it?
>
> regards,
> Leet Geezer
>
You can include or exclude transitive dependencies in your pom.xml.
Here's an example I recently used, I excluded the transitive ecache.jar
dependency that Hibernate brings to the project.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.1.2</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>ehcache</groupId>
<artifactId>ehcache</artifactId>
</exclusion>
</exclusions>
</dependency>
If you want to use newer version of some transitive dependency, just create
a new dependency block with the right version number. By this you override
the transitive dependency with your own dependency.
I hope this is what you were looking for.
--
View this message in context:
http://www.nabble.com/Force-higher-version-dependency--tf4082732s177.html#a11609700
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]