I am having some trouble with case sensitivity in dependency resolution.
In my nexus repository are two artifacts available:
- my.test:name:1.0.0.0-SNAPSHOT
- my.test:Name:1.0.0.0-SNAPSHOT
Which results in the following structure:
When I am try to resolve dependencies like this:
plugins {
id 'java'
}
version = '1.0.0.0-SNAPSHOT'
dependencies {
implementation ('my.test:name:1.0.0.0-SNAPSHOT')
implementation ('my.test:Name:1.0.0.0-SNAPSHOT')
}
assemble {
doLast {
configurations.runtimeClasspath.each {
println "artifact: ${it}"
}
}
}
repositories {
maven {
url '<nexus url>'
}
}
I only got one artifact resolved (tried with gradle 5.6.4 and 6.5):
gradle assemble --no-build-cache
> Task :assemble
artifact: C:\...\.gradle\caches\modules-2\files-2.1\my.test\Name\1.0.0.0-SNAPSHOT\67d0368b1f697e42917e972e1ec0b2935f10cc3c\Name-1.0.0.0-SNAPSHOT.jar
BUILD SUCCESSFUL in 2s
Luckily I have a workaround:
configurations.all {
resolutionStrategy {
cacheChangingModulesFor 0, 'seconds'
}
}
Which solves the problem but sounds not like “having max performance” to me:
gradle assemble --no-build-cache
> Task :assemble
artifact: C:\...\.gradle\caches\modules-2\files-2.1\my.test\name\1.0.0.0-SNAPSHOT\eda160866317fc76f96365bbdbd65324cccd9e77\name-1.0.0.0-SNAPSHOT.jar
artifact: C:\...\.gradle\caches\modules-2\files-2.1\my.test\Name\1.0.0.0-SNAPSHOT\67d0368b1f697e42917e972e1ec0b2935f10cc3c\Name-1.0.0.0-SNAPSHOT.jar
BUILD SUCCESSFUL in 2s
Hopefully someone has a better idea or do you think I should create a bug report?