Dependencies of type pom do not work consistently

In a project at our company one team uses a maven project of type pom to group a couple of other dependencies. When using maven, one can use this dependency with


but in gradle, using

compile "group:artifact:version@pom"

does not work. I have to use

compile "group:artifact:version"

But when I define a dependency to another maven project, which does also have a dependency on the pom-type project, things go strange. Configurations.compile does not only contain jars, but also the pom





apply plugin: 'java'
apply plugin: 'maven-publish'
repositories {
dependencies {
    compile 'gradlepomdependency:gradlepomdependency:0.0.1-SNAPSHOT' // @pom does not work
  task listDependencies << {
    configurations.runtime.each System.out.&println
publishing {
    publications {
        mavenJava(MavenPublication) {

=> gradle listDependencies does list one pom and one jar, it should only contain the jar.

=> The generated maven pom file in generatePomFileForMavenJavaPublication does not define pom. The dependency will most probably not work when used from maven.

I think the issue is with the pom.xml. Does it work correctly if you remove pom from the definition? The point of using "@pom"is to override the default type of “@jar”.

If you remove


from the dependency in the pom.xml, maven projects depending on it will not work anymore. The only way would be to also set


in the pom.xml (or remove that line, as that is the default). But that would result in an empty jar, which might not be desired.