Gradle fails to resolve a maven parent dependency

My build names two dependencies to cucumber-jvm:

testCompile ‘info.cukes:cucumber-java:1.1.1’

testCompile ‘info.cukes:cucumber-junit:1.1.1’

Both depend on the core package, cucumber-jvm, which uses the maven packaging type “pom”. Gradle 1.2 tries to resolve the .jar file for cucumber-jvm, though. Can I work around this?

In my build, I see this:

Download http://repo1.maven.org/maven2/info/cukes/cucumber-java/1.1.1/cucumber-java-1.1.1.pom
Download http://repo1.maven.org/maven2/info/cukes/cucumber-jvm/1.1.1/cucumber-jvm-1.1.1.pom
Download http://repo1.maven.org/maven2/info/cukes/cucumber-junit/1.1.1/cucumber-junit-1.1.1.pom
  FAILURE: Build failed with an exception.
  * What went wrong:
Could not resolve all dependencies for configuration ':Engine_Character:testCompile'.
> Could not resolve group:info.cukes, module:cucumber-java, version:1.1.1.
  Required by:
      workspace:Engine_Character:unspecified
   > Could not resolve group:info.cukes, module:cucumber-jvm, version:1.1.1.
      > Could not HEAD 'http://repo1.maven.org/maven2/info/cukes/cucumber-jvm/1.1.1/cucumber-jvm-1.1.1.jar'.
> Could not resolve group:info.cukes, module:cucumber-junit, version:1.1.1.
  Required by:
      workspace:Engine_Character:unspecified
   > Could not resolve group:info.cukes, module:cucumber-jvm, version:1.1.1.
      > Could not HEAD 'http://repo1.maven.org/maven2/info/cukes/cucumber-jvm/1.1.1/cucumber-jvm-1.1.1.jar'.

This could be related to this issue, where getting a dependency from Maven Central failed.

Resolves fine for me with Gradle 1.2. I think that Gradle checking for the Jar isn’t the cause of the problem. Maybe it’s just another manifestation of the recent problems with Central.

Indeed, it works on another machine. Do you have a place I can watch to follow the state of the problems with Central?

I’ve created https://issues.sonatype.org/browse/MVNCENTRAL-259. Let’s see what the maintainers of Maven Central say.

Looking at similar reports like https://issues.sonatype.org/browse/MVNCENTRAL-252, it seems very likely that something is wrong with Maven Central.

Sonatype’s CDN provider’s fix did the trick for me, things are back to normal. Thank you, Peter.