Maven publishing plugin doesn't upload generated POM file

I was trying out the new Maven publishing plugin for one of my projects. The binary repository I use is a local Artifactory instance with version 3.0.1. The project declares a single Java publication and applies some minor modifications to the POM of this publication. When executing the publish task only the JAR file is uploaded, as shown in the following command line output:

$ gradle publish
:compileJava UP-TO-DATE
:compileGroovy UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
Uploading: org/gradle/api/plugins/gradle-cloudbees-plugin/0.1/gradle-cloudbees-plugin-0.1.jar to repository remote at http://localhost:8080/artifactory/libs-release-local
Transferring 179K from remote
Uploaded 179K

When I have a look at the published POM file on Artifactory the content doesn’t reflect my configuration.


Shouldn’t the POM get uploaded as well. Is there anything missing from my configuration below? If I publish the artifact to Maven Local I can see the correct POM file.

apply plugin: 'maven-publish'
  publishing {
     publications {
        plugin(MavenPublication) {
     pom.withXml {
    def root = asNode()
    root.appendNode('name', 'Gradle CloudBees plugin')
    root.appendNode('description', 'Gradle plugin for managing applications and databases on CloudBees RUN@cloud.')
    root.appendNode('url', '')
    root.appendNode('inceptionYear', '2013')
          def scm = root.appendNode('scm')
    scm.appendNode('url', '')
    scm.appendNode('connection', 'scm:')
    scm.appendNode('developerConnection', 'scm:git://')
          def license = root.appendNode('licenses').appendNode('license')
    license.appendNode('name', 'The Apache Software License, Version 2.0')
    license.appendNode('url', '')
    license.appendNode('distribution', 'repo')
          def developer = root.appendNode('developers').appendNode('developer')
    developer.appendNode('id', 'bmuschko')
    developer.appendNode('name', 'Benjamin Muschko')
    developer.appendNode('email', '')
   repositories {
  maven {
   url project.version.endsWith('-SNAPSHOT') ? artifactorySnapshotRepositoryUrl : artifactoryReleaseRepositoryUrl
        credentials {
    username = artifactoryUsername
    password = artifactoryPassword

Don’t trust the logs to tell you what files are uploaded. POM files should definitely be uploading, and we have tests that verify this (but not to Artifactory).

First step would be to check the content of the generated POM file: it should be located something like ‘build/publications/plugin/pom-default.xml’.

The content of the file ‘build/publications/plugin/pom-default.xml’ looks correct:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xsi:schemaLocation="" xmlns:xsi="">
  <name>Gradle CloudBees plugin</name>
  <description>Gradle plugin for managing applications and databases on CloudBees RUN@cloud.</description>
      <name>The Apache Software License, Version 2.0</name>
      <name>Benjamin Muschko</name>

Hmmm. So we’re still delegating the task of uploading to the Maven Ant Tasks. Not sure why your POM isn’t uploading correctly to Artifactory. Anything interesting show up in the debug logs?

Sorry my bet. This works just fine. Thanks for responding.