Gradle 2.2.1 seems to ignore my classifier on my dependency, and then tries to download the wrong thing

This is a similar problem to what’s described here: Build failure when 4.1.0 of net.java.dev.jna:jna is selected in place of 3.3.0 due to change in artifacts with classifiers

Basically, Gradle is trying to ensure there’s a single version of a given dependency, but it ignores classifiers as describing “different” dependencies. Maven fails differently and will give you duplicate or mismatching dependencies (one with the classifier and one without).

The classifier is sort of the wrong thing for this. In this particular case, I think you want to use a different dependency instead of the classifier:
https://artifacts.alfresco.com/nexus/content/groups/public/org/mybatis/mybatis/3.0.4-alfresco-patched/

You’ll need to force it to prevent conflict resolution from picking 3.0.5:

dependencies {
    compile(group: 'org.mybatis', name: 'mybatis', version:'3.0.4-alfresco-patched') {
        force = true
    }
    compile(group: 'org.mybatis', name: 'mybatis-spring', version:'1.0.1') {}
}