Where can I find the document for `(*)` and `1.7.6 -> 1.7.7` in the output of `gradle dependencies`

天涯浪子 提交于 2021-01-29 04:20:57

问题


For a gradle project with simple build.gradle file:

apply plugin: 'java'

repositories.jcenter()

dependencies {
    compile "org.springframework.boot:spring-boot-starter-web:1.1.5.RELEASE"
    compile 'org.slf4j:slf4j-api:1.7.1'
}

When I run gradle dependencies, it will show:

:dependencies

------------------------------------------------------------
Root project
------------------------------------------------------------

archives - Configuration for archive artifacts.
No dependencies

compile - Compile classpath for source set 'main'.
+--- org.springframework.boot:spring-boot-starter-web:1.1.5.RELEASE
|    +--- org.springframework.boot:spring-boot-starter:1.1.5.RELEASE
|    |    +--- org.springframework.boot:spring-boot:1.1.5.RELEASE
|    |    |    +--- org.springframework:spring-core:4.0.6.RELEASE
|    |    |    |    \--- commons-logging:commons-logging:1.1.3
|    |    |    \--- org.springframework:spring-context:4.0.6.RELEASE
|    |    |         +--- org.springframework:spring-aop:4.0.6.RELEASE
|    |    |         |    +--- aopalliance:aopalliance:1.0
|    |    |         |    +--- org.springframework:spring-beans:4.0.6.RELEASE
|    |    |         |    |    \--- org.springframework:spring-core:4.0.6.RELEASE (*)
|    |    |         |    \--- org.springframework:spring-core:4.0.6.RELEASE (*)
|    |    |         +--- org.springframework:spring-beans:4.0.6.RELEASE (*)
|    |    |         +--- org.springframework:spring-core:4.0.6.RELEASE (*)
|    |    |         \--- org.springframework:spring-expression:4.0.6.RELEASE
|    |    |              \--- org.springframework:spring-core:4.0.6.RELEASE (*)
|    |    +--- org.springframework.boot:spring-boot-autoconfigure:1.1.5.RELEASE
|    |    |    \--- org.springframework.boot:spring-boot:1.1.5.RELEASE (*)
|    |    +--- org.springframework.boot:spring-boot-starter-logging:1.1.5.RELEASE
|    |    |    +--- org.slf4j:jcl-over-slf4j:1.7.7
|    |    |    |    \--- org.slf4j:slf4j-api:1.7.7
|    |    |    +--- org.slf4j:jul-to-slf4j:1.7.7
|    |    |    |    \--- org.slf4j:slf4j-api:1.7.7
|    |    |    +--- org.slf4j:log4j-over-slf4j:1.7.7
|    |    |    |    \--- org.slf4j:slf4j-api:1.7.7
|    |    |    \--- ch.qos.logback:logback-classic:1.1.2
|    |    |         +--- ch.qos.logback:logback-core:1.1.2
|    |    |         \--- org.slf4j:slf4j-api:1.7.6 -> 1.7.7
|    |    +--- org.springframework:spring-core:4.0.6.RELEASE (*)
|    |    \--- org.yaml:snakeyaml:1.13
|    +--- org.springframework.boot:spring-boot-starter-tomcat:1.1.5.RELEASE
|    |    +--- org.apache.tomcat.embed:tomcat-embed-core:7.0.54
|    |    +--- org.apache.tomcat.embed:tomcat-embed-el:7.0.54
|    |    \--- org.apache.tomcat.embed:tomcat-embed-logging-juli:7.0.54
|    +--- com.fasterxml.jackson.core:jackson-databind:2.3.3
|    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.3.0
|    |    \--- com.fasterxml.jackson.core:jackson-core:2.3.3
|    +--- org.hibernate:hibernate-validator:5.0.3.Final
|    |    +--- javax.validation:validation-api:1.1.0.Final
|    |    +--- org.jboss.logging:jboss-logging:3.1.1.GA
|    |    \--- com.fasterxml:classmate:1.0.0
|    +--- org.springframework:spring-core:4.0.6.RELEASE (*)
|    +--- org.springframework:spring-web:4.0.6.RELEASE
|    |    +--- org.springframework:spring-aop:4.0.6.RELEASE (*)
|    |    +--- org.springframework:spring-beans:4.0.6.RELEASE (*)
|    |    +--- org.springframework:spring-context:4.0.6.RELEASE (*)
|    |    \--- org.springframework:spring-core:4.0.6.RELEASE (*)
|    \--- org.springframework:spring-webmvc:4.0.6.RELEASE
|         +--- org.springframework:spring-beans:4.0.6.RELEASE (*)
|         +--- org.springframework:spring-context:4.0.6.RELEASE (*)
|         +--- org.springframework:spring-core:4.0.6.RELEASE (*)
|         +--- org.springframework:spring-expression:4.0.6.RELEASE (*)
|         \--- org.springframework:spring-web:4.0.6.RELEASE (*)
\--- org.slf4j:slf4j-api:1.7.1 -> 1.7.7

There are two things I'm not very sure, although I've read some articles:

  1. (*) means this dependency is already present and download in previous steps
  2. 1.7.1 -> 1.7.7 this dependency is declared as 1.7.1, but gradle decide to use 1.7.7 after conflict resolution

Not sure if my understanding correct, how can I find some official document to explain them? I searched the gradle website, but not find yet


回答1:


While not an official documentation, I found the following in gradle dependency-resolution-reporting.md design-doc:

  • avoid regression of current features:
    • subtree is omitted (*)

Note, however, that this design-doc was changed on April 2 (see change here) as part of the work on the release of v2.5 and this comment was removed from this document.



来源:https://stackoverflow.com/questions/29916424/where-can-i-find-the-document-for-and-1-7-6-1-7-7-in-the-output-of-g

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!