How to upgrade all dependencies to a specific version

Posted by Calm Storm on Stack Overflow See other posts from Stack Overflow or by Calm Storm
Published on 2010-04-07T08:54:11Z Indexed on 2010/04/07 9:13 UTC
Read the original article Hit count: 454

Filed under:
|

Hi, I tried doing a mvn dependency:tree and I get a tree of dependencies.

My question is, My project depends on many modules which internally depends on many spring artifacts. There are a few version clashes. I want to upgrade all spring related libraries to say the latest one (2.6.x or above). What is the preferred way to do this?

Should I declare all the deps spring-context, spring-support (and 10 other artifacts) in my pom.xml and point them to 2.6.x ? Is there any other better method ?

[INFO] +- com.xxxx:yyy-jar:jar:1.0-SNAPSHOT:compile
[INFO] |  +- com.xxxx:zzz-commons:jar:1.0-SNAPSHOT:compile
[INFO] |  |  +- org.springframework:spring-dao:jar:2.0.7:compile
[INFO] |  |  +- org.springframework:spring-jdbc:jar:2.0.7:compile
[INFO] |  |  +- org.springframework:spring-web:jar:2.0.7:compile
[INFO] |  |  +- org.springframework:spring-support:jar:2.0.7:compile
[INFO] |  |  +- net.sf.ehcache:ehcache:jar:1.2:compile
[INFO] |  |  +- commons-collections:commons-collections:jar:3.2:compile
[INFO] |  |  +- aspectj:aspectjweaver:jar:1.5.3:compile
[INFO] |  |  +- betex-commons:betex-commons:jar:5.5.1-2:compile
[INFO] |  |  \- javax.servlet:servlet-api:jar:2.4:compile
[INFO] |  +- org.springframework:spring-beans:jar:2.0.7:compile
[INFO] |  +- org.springframework:spring-jmx:jar:2.0.7:compile
[INFO] |  +- org.springframework:spring-remoting:jar:2.0.7:compile
[INFO] |  +- org.apache.cxf:cxf-rt-core:jar:2.0.2-incubator:compile
[INFO] |  |  +- org.apache.cxf:cxf-api:jar:2.0.2-incubator:compile
[INFO] |  |  |  +- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.0-M1:compile
[INFO] |  |  |  +- org.codehaus.woodstox:wstx-asl:jar:3.2.1:compile
[INFO] |  |  |  +- org.apache.neethi:neethi:jar:2.0.2:compile
[INFO] |  |  |  \- org.apache.cxf:cxf-common-schemas:jar:2.0.2-incubator:compile

UPDATE : I have removed the extra question about "\-" so my question is now what the subject asks for :)

© Stack Overflow or respective owner

Related posts about java

Related posts about maven-2