Dependencies not being downloaded after upgrading from 4.10 to 5.0

I am upgrading a project that mainly executes ‘test’ tasks from 4.8 to 5.4.1.

I’ve been following the recomendations at https://docs.gradle.org/5.4/userguide/upgrading_version_4.html and have upgraded to 4.10 with no issues.

Once I went to 5.0, some dependencies that were being downloaded previously are no longer being downloaded. Exampls of some of the message I’ve been getting:

  • unable to resolve class org.joda.time.Seconds
  • unable to resolve class org.glassfish.jersey.uri.UriComponent
  • unable to resolve class javax.ws.rs.POST

I can explicitly add these as dependencies in my build.gradle file but am wondering what change(s) in the 5.0 version is causing this, and if there is something I should be configuring properly to handle these like how they were handled in the 4.x versions?

I was facing the same issue, what I found is the in my build.gradle file, where i was declaring dependencies through ‘api’ , in that there was one jar who’s pom file had code that was limiting the scope of its dependent jars as ‘test’ only, after removing that scope line, and using the new pom, fixed the issue for me.
Make sure you have this
metadataSources {
mavenPom()
artifact()
ignoreGradleMetadataRedirection()
}
inside the maven where repositories are listed