2017-08-02 137 views
0

在我的項目中沒有任何地方提到我想要使用任何Spring庫版本4.3.8.RELEASE。但是,當進行「彙編」時,Gradle會爲幾個依賴關係選擇最新版本。當我做了一個 「gradle這個依賴性」,我看到:Gradle獲取某些庫的最新版本

+--- aopalliance:aopalliance:1.0 
| | +--- org.springframework.security:spring-security-core:3.2.0.RELEASE 
| | | +--- aopalliance:aopalliance:1.0 
| | | +--- org.springframework:spring-aop:3.2.6.RELEASE -> 4.3.8.RELEASE 
| | | | +--- org.springframework:spring-beans:4.3.8.RELEASE 
| | | | | \--- org.springframework:spring-core:4.3.8.RELEASE 
| | | | |   \--- commons-logging:commons-logging:1.2 
| | | | \--- org.springframework:spring-core:4.3.8.RELEASE (*) 
| | | +--- org.springframework:spring-beans:3.2.6.RELEASE -> 4.3.8.RELEASE (*) 
| | | +--- org.springframework:spring-context:3.2.6.RELEASE -> 4.3.8.RELEASE 
| | | | +--- org.springframework:spring-aop:4.3.8.RELEASE (*) 

憑啥的搖籃做這樣的事情:AOP:3.2.6.RELEASE - > 4.3.8.RELEASE

任何其他命令追蹤依賴來自哪裏?

+0

難道我的回答幫助? – LazerBanana

+1

它做到了。這當然是種問題,沒有人能提供100%匹配的答案,因爲問題的一部分也是我們的內部組織......但是,它是有幫助的。 Sory,我忘了回來... – hublo

回答

2

那些可能是來自不同庫的傳遞依賴關係。

使用dependencyInsight來跟蹤來自哪裏。

gradle -q dependencyInsight --configuration <configuration> --dependency <dependency> 

<dependency> - 依賴

<configuration>的名字 - 編譯,運行時間等

您還可以使用依賴性和管它的文件和手動搜索。

gradle dependencies >deps.txt 

其他來源gradle getting more dependency