Shouldn't the version matching ignore letter case?


(Crazyjavahacking) #1

Hi,

today I found a problem with one artifact deployed into Maven Central. If the version of the artifact does not match the version in the pom.xml (clearly a wrong pom.xml) Gradle fails.

This happens because the artifact org.hibernate:hibernate-annotations:3.3.0.ga in Maven central has version 3.3.0.GA in the pom.xml. Such wrong pom.xml is in Maven central from 2007!

Gradle’s fail is correct behavior, but in similar situations, shouldn’t Gradle compare/verify versions ignoring the case?

This is 100% reproducible with the following code:

repositories {
    mavenCentral()
}

configurations {
    compile
}


dependencies {
    compile 'org.hibernate:hibernate-annotations:3.3.0.ga'
}


task resolveDeps {
    doLast {
        configurations.compile.resolve()
    }
}

Thanks.


(Crazyjavahacking) #2

It looks like in sole old version of Gradle it was most likely comparing ignoring the case.