Why isn't gradle idea adding a jar to the module dependencies?

plugins

(Trejkaz (pen name)) #1

I have a dependency on these two:

    'org.elasticsearch.plugin:analysis-icu:5.1.2',
    'org.elasticsearch.plugin:analysis-kuromoji:5.1.2',

When I run gradle idea, I don’t get either of these jars added to my module, but I also don’t get any warning about the artifacts not being resolvable.

If I look in the cache, I only see the .zip:

$ find ~/.gradle/caches/modules-2/files-2.1/org.elasticsearch.plugin/analysis-icu/5.1.2
/Users/daniel/.gradle/caches/modules-2/files-2.1/org.elasticsearch.plugin/analysis-icu/5.1.2
/Users/daniel/.gradle/caches/modules-2/files-2.1/org.elasticsearch.plugin/analysis-icu/5.1.2/7b15f2faf60213b6a54e1a3d9bce1492788ad7ff
/Users/daniel/.gradle/caches/modules-2/files-2.1/org.elasticsearch.plugin/analysis-icu/5.1.2/7b15f2faf60213b6a54e1a3d9bce1492788ad7ff/analysis-icu-5.1.2.zip

If it couldn’t find them in the repository, at the bare minimum a warning would have been nice.


(Trejkaz (pen name)) #2

As an interesting data point, if I blow my cache away and re-run the build, suddenly it downloads the jars and adds them.

So what is going on in Gradle’s cache? It’s pretty scary, because it makes it look like the build is successful when it really isn’t. Is it caching the absence of an artifact, and then later treating that as success?