… even if dependency resolution is configured as follows:
allprojects {
configurations {
all*.exclude module: 'log4j'
all*.exclude module: 'servlet-api'
all {
resolutionStrategy {
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
failOnVersionConflict()
dependencyVersions.each { force it }
eachDependency { DependencyResolveDetails details ->
def forcedVersion = dependencyGroupVersions[details.requested.group]
if (forcedVersion) {
details.useVersion forcedVersion
}
}
}
}
}
}
dependencyVersions and dependencyGroupVersions are dependencies defined in the project.
We are using Gradle 2.11, Nexus as artifact repository and do not have snapshot releases.
Even if I specify a fixed version which is newer than the version gradle found, this most recent version does not
seem to be cached. When I switch back to ‘+’ for the dependency the old one is taken into account not the most recent
one stored in the artifact repository.
Maybe someone could shed some light onto this topic.
Thanks in advance!