2013-05-25 116 views
0

由于某种原因,显然gradle似乎认为我的'spring data'依赖于slf4j。这里其实摇篮打印出Gradle添加随机依赖?

org.springframework.data:spring-data-commons:1.5.1.RELEASE  
+--- org.springframework:spring-core:3.1.4.RELEASE (*)   
+--- org.springframework:spring-beans:3.1.4.RELEASE (*)   
+--- org.slf4j:slf4j-api:1.7.1         
\--- org.slf4j:jcl-over-slf4j:1.7.1 

虽然春天公共数据依赖关系图中不对SLF4J的依赖: http://mvnrepository.com/artifact/org.springframework.data/spring-data-commons/1.5.1.RELEASE

为什么gradle这个随机加上SLF4J是依赖?

旁边还有一些依赖我看到了“*”符号,这显然表示:

(*) - dependencies omitted (listed previously) 

现在为什么会这样呢?为什么省略一些依赖项?

回答

2

Gradle不是随机添加依赖项。 spring-data-commons模块从其父POM继承slf4j依赖项。

为了便于阅读,省略了spring-core和spring-beans的依赖关系,因为它们在依赖关系图输出中已经列在较高的位置。