我的项目中没有任何地方提到我想使用任何 Spring 库版本 4.3.8.RELEASE。但是,在进行“组装”时,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 (*)
为什么 Gradle 会做这样的事情:aop:3.2.6.RELEASE -> 4.3.8.RELEASE
任何其他命令来跟踪依赖项的来源?
这些可能是来自不同库的传递依赖项。
使用dependencyInsight
跟踪从那里会发生什么。
gradle -q dependencyInsight --configuration <configuration> --dependency <dependency>
<dependency>
- 依赖的名称
<configuration>
- 编译、运行时等。
您还可以使用依赖项并将其通过管道传输到文件并手动搜索。
gradle dependencies >deps.txt
额外的源代码获得更多依赖
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句