You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by leetgeezer <le...@gmail.com> on 2007/07/15 18:49:50 UTC
Force higher version dependency?
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
--
View this message in context: http://www.nabble.com/Force-higher-version-dependency--tf4082732s177.html#a11603904
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Force higher version dependency?
Posted by noon <ra...@gmail.com>.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Force higher version dependency?
Posted by leetgeezer <le...@gmail.com>.
Thanks, that's what I was looking for
--
View this message in context: http://www.nabble.com/Force-higher-version-dependency--tf4082732s177.html#a11614647
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org