Dependency not working on same version

At our company, we use Artifactory to manage artifacts and dependencies of Gradle.
We have library that was build with Gradle 6.0.1, in addition, have a micro-service that was built with Gradle 6.0.1 that is using this library as a dependency.
I verified that this library exists in the declared repo.

When we try to build the project we get an error that this library doesn’t exist in the declared repositories and that we should declare the correct one.
The weird part is that if we downgrade the micro-service to Gradle version 5.6.2 the library does get download and working.
We also tested it with other older micro-services that we have based on a template project that is built with Gradle version 4.10.3 and It’s also working in them.

What could be the issue?

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find
     Required by:
         project :

The library I was referring to in my question didn’t have the POM file published with it.

So either I will need to publish it again with the POM being generated (since the library itself was built with Gradle and not Maven - there is a way to generate POM with Gradle)


I will add the following code to build.gradle file so Gradle will download the artifact even though it doesn’t have POM file.

repositories {
  maven {
    url uri('lib') 
      metadataSources {

The maven-publish plugin does publish a POM. What was used in the library’s build to publish it to your Artifactory repo?