Gradle doesn't seem to be downloading dependencies from the custom Maven repository defined in a POM of a dependency

I’m using maven-publish to publish a jar to our custom Maven repository which has a dependency to another jar located at another custom Maven repository.

Here’s the maven-publish code to add repositories to the published pom:

publishing {
    publications {
        maven(MavenPublication) {

            pom.withXml {
                def confluentRepo = asNode().appendNode('repositories').appendNode('repository')
                confluentRepo.appendNode('id', 'confluent')
                confluentRepo.appendNode('name', 'Confluent')
                confluentRepo.appendNode('url', '')

Here’s the generated pom:


But when I add this published module as a dependency to another project, gradle fails to download the jar that’s located at this custom repository.

I’m using gradle version 2.12

Any help is much appreciated.

Mind if I ask which version of Gradle you’re using here?

I knew I was missing something. Sorry about that.

I’m using version 2.12