【发布时间】:2011-08-19 23:58:44
【问题描述】:
我正在使用 Maven2。当我查看mvn dependency:tree -Dverbose 的输出时,我看到了很多:
[INFO] +- org.springframework:spring-orm:jar:3.0.5.RELEASE:compile
[INFO] | +- (org.springframework:spring-beans:jar:3.0.5.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:3.0.5.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-jdbc:jar:3.0.5.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-tx:jar:3.0.5.RELEASE:compile - omitted for duplicate)
所有这些都包含在我的 pom 中作为依赖项。我的问题是,遵循哪个策略,保留它,仅排除版本冲突,或排除每个传递依赖项。
我在手册中看不到任何与此相关的内容。
谢谢!
【问题讨论】:
-
问题是,如果其他依赖项已经作为传递依赖项出现,为什么还要将它们添加到 POM 中?
标签: maven-2 maven maven-3 dependency-management