我在build.gradle
中大概有类似他的东西:
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'minutes'
}
dependencies {
compile 'com.company:common-lib:1.0-SNAPSHOT'
}
使用./gradlew compileJava
在本地执行时,会下载common-lib:1.0-SNAPSHOT
的新快照版本。但是由于某些原因,在构建服务器上没有发生这种情况。我不确定如何调试这个?
与--debug
一起运行时,相关输出为:
Adding managed version in configuration 'compile' for dependency 'DefaultExternalModuleDependency{group='com.company', name='common-lib', version='1.0-SNAPSHOT', configuration='default'}'
Visiting dependency com.company:some-service:1.0(detachedConfiguration12) -> com.company:common-lib:1.0-SNAPSHOT(detachedConfiguration12)
Processing dependency 'com.company:common-lib:1.0-SNAPSHOT'
Preserving existing versions: {com.company:common-lib=1.0-SNAPSHOT, com.company:common-lib2=1.0-SNAPSHOT, com.company:common-lib2-service=1.0-SNAPSHOT}
Resolved versions: {com.company:common-lib=1.0-SNAPSHOT, com.company:common-lib2=1.0-SNAPSHOT, com.company:common-lib2-service=1.0-SNAPSHOT}
Found managed version '1.0-SNAPSHOT' for dependency 'com.company:common-lib' in dependency management for configuration 'compile'
Using version '1.0-SNAPSHOT' for dependency 'com.company:common-lib:1.0-SNAPSHOT'
Selecting new module version com.company:common-lib:1.0-SNAPSHOT
Attempting to resolve component for com.company:common-lib:1.0-SNAPSHOT using repositories [maven, BintrayJCenter]
Found cached version of changing module 'com.company:common-lib:1.0-SNAPSHOT' in 'maven'
Using cached module metadata for module 'com.company:common-lib:1.0-SNAPSHOT' in 'maven'
Using com.company:common-lib:1.0-SNAPSHOT from Maven repository 'maven'
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(default).
Visiting dependency com.company:common-lib2:1.0-SNAPSHOT(default) -> com.company:common-lib:1.0-SNAPSHOT(compile,runtime)
Visiting dependency com.company:common-lib2-service:1.0-SNAPSHOT(default) -> com.company:common-lib:1.0-SNAPSHOT(compile,runtime)
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(compile).
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(master).
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(runtime).
Visiting dependency com.company:common-lib2:1.0-SNAPSHOT(compile) -> com.company:common-lib:1.0-SNAPSHOT(compile,runtime)
Visiting dependency com.company:common-lib2:1.0-SNAPSHOT(runtime) -> com.company:common-lib:1.0-SNAPSHOT(compile,runtime)
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(compile).
Changed edges for com.company:common-lib:1.0-SNAPSHOT(compile) selects same versions as previous traversal. ignoring
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(master).
Changed edges for com.company:common-lib:1.0-SNAPSHOT(master) selects same versions as previous traversal. ignoring
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(runtime).
Changed edges for com.company:common-lib:1.0-SNAPSHOT(runtime) selects same versions as previous traversal. ignoring
com.company:common-lib
com.company:common-lib
com.company:common-lib
com.company:common-lib
Visiting dependency com.company:some-service:1.0(detachedConfiguration13) -> com.company:common-lib:1.0-SNAPSHOT(detachedConfiguration13)
Selecting new module version com.company:common-lib:1.0-SNAPSHOT
Attempting to resolve component for com.company:common-lib:1.0-SNAPSHOT using repositories [maven, BintrayJCenter]
Using com.company:common-lib:1.0-SNAPSHOT from Maven repository 'maven'
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(default).
com.company:common-lib:1.0-SNAPSHOT(default) has no transitive incoming edges. ignoring outgoing edges.
Found artifact 'common-lib.pom (com.company:common-lib:1.0-SNAPSHOT)' in resolver cache: ~/.gradle/caches/modules-2/files-2.1/com.company/common-lib/1.0-SNAPSHOT/31ff0a504a7238270426365f213a40d94eaadd3f/common-lib-1.0-SNAPSHOT.pom
com.company:common-lib depends on:
com.company:common-lib excludes:
com.company:common-lib
com.company:common-lib
com.company:common-lib
com.company:common-lib
com.company:common-lib
Visiting dependency com.company:some-service:1.0(compile) -> com.company:common-lib:1.0-SNAPSHOT(compile)
Processing dependency 'com.company:common-lib:1.0-SNAPSHOT'
Found managed version '1.0-SNAPSHOT' for dependency 'com.company:common-lib' in dependency management for configuration 'compile'
Using version '1.0-SNAPSHOT' for dependency 'com.company:common-lib:1.0-SNAPSHOT'
Selecting new module version com.company:common-lib:1.0-SNAPSHOT
Attempting to resolve component for com.company:common-lib:1.0-SNAPSHOT using repositories [maven, BintrayJCenter]
Using com.company:common-lib:1.0-SNAPSHOT from Maven repository 'maven'
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(default).
Visiting dependency com.company:common-lib2:1.0-SNAPSHOT(default) -> com.company:common-lib:1.0-SNAPSHOT(compile,runtime)
Visiting dependency com.company:common-lib2-service:1.0-SNAPSHOT(default) -> com.company:common-lib:1.0-SNAPSHOT(compile,runtime)
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(compile).
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(master).
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(runtime).
Visiting dependency com.company:common-lib2:1.0-SNAPSHOT(compile) -> com.company:common-lib:1.0-SNAPSHOT(compile,runtime)
Visiting dependency com.company:common-lib2:1.0-SNAPSHOT(runtime) -> com.company:common-lib:1.0-SNAPSHOT(compile,runtime)
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(compile).
Changed edges for com.company:common-lib:1.0-SNAPSHOT(compile) selects same versions as previous traversal. ignoring
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(master).
Changed edges for com.company:common-lib:1.0-SNAPSHOT(master) selects same versions as previous traversal. ignoring
Visiting configuration com.company:common-lib:1.0-SNAPSHOT(runtime).
Changed edges for com.company:common-lib:1.0-SNAPSHOT(runtime) selects same versions as previous traversal. ignoring
Loading http://localhost:8081/artifactory/repository/com/company/common-lib/1.0-SNAPSHOT/common-lib-1.0-20160317.194817-12.jar
Constructing external resource: http://localhost:8081/artifactory/repository/com/company/common-lib/1.0-SNAPSHOT/common-lib-1.0-20160317.194817-12.jar
Constructing external resource metadata: http://localhost:8081/artifactory/repository/com/company/common-lib/1.0-SNAPSHOT/common-lib-1.0-20160317.194817-12.jar
Performing HTTP HEAD: http://localhost:8081/artifactory/repository/com/company/common-lib/1.0-SNAPSHOT/common-lib-1.0-20160317.194817-12.jar
Executing request HEAD /artifactory/repository/com/company/common-lib/1.0-SNAPSHOT/common-lib-1.0-20160317.194817-12.jar HTTP/1.1
Executing request HEAD /artifactory/repository/com/company/common-lib/1.0-SNAPSHOT/common-lib-1.0-20160317.194817-12.jar HTTP/1.1
Cached resource Thu Mar 17 19:48:17 UTC 2016 is up-to-date (lastModified: http://localhost:8081/artifactory/repository/com/company/common-lib/1.0-SNAPSHOT/common-lib-1.0-20160317.194817-12.jar).
Downloaded artifact 'common-lib.jar (com.company:common-lib:1.0-SNAPSHOT)' from resolver: maven
请注意,最新版本的快照不是common-lib-1.0-20160317.194817-12.jar
,而是odoro-domain-1.0-20160323.120359-13.jar
我试图弄清楚它为什么没有下载最新快照的下一步是什么?