For historical reasons I unfortunately need to use a flatDir repository pointing to a directory full of random jar files checked into SVN. So, I have a buildSrc/build.gradle that looks like this:
repositories {
flatDir(name: 'foo', dirs: "/path/to/directory/full/of/jars");
}
dependencies {
compile gradleApi()
compile localGroovy()
compile 'org.apache.uima:uimaj-core:2.3.+'
compile module('org.uimafit:uimafit:1.+') {
dependencies 'org.springframework:spring-core:3.+',
'org.apache.lucene:lucene-core:3.5.+',
'org.apache.lucene:lucene-analyzers:3.5.+',
'com.yammer.metrics:metrics-core:2.0.+'
}
}
This worked fine in Gradle 1.9, but since Gradle 1.10, I get this error:
Could not resolve all dependencies for configuration ‘:runtime’. > Could not download artifact ‘org.uimafit:uimafit:1.+:uimafit.jar’
Artifact ‘org.uimafit:uimafit:1.+:uimafit.jar’ not found.
When I look in the debug output, I see that it is initially finding the jar just fine:
17:08:55.067 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain] Attempting to resolve module ‘org.uimafit:uimafit:1.+’ using repositories [foo] 17:08:55.074 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] Listing all in …/uimafit-[revision].jar 17:08:55.080 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] using foo to list all in /redacted
17:08:55.087 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] found 147 urls 17:08:55.113 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] 1 matched …/uimafit-[revision].jar 17:08:55.117 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] Listing all in …/uimafit.jar 17:08:55.122 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ResourceVersionLister] revision token not defined in pattern …/uimafit.jar. 17:08:55.129 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Loading …/uimafit-1.2.0.jar
But then after visiting all the transitive dependencies, it tries to find it again and fails:
17:08:55.573 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Loading …/uimafit-1.+.jar 17:08:55.573 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver] Resource not reachable for org.uimafit#uimafit;1.+!uimafit.jar: res=MissingResource: …/uimafit-1.+.jar
Any idea why?