publishPlugins prepends text on the groupID

When I run a publishPlugins task it is generating a pom with incorrect data.

I have the following config:

pluginBundle {
    website = 'scuilion.wordpress.com'
    vcsUrl = 'https://github.com/scuilion/gradle-syntastic-plugin.git'
    tags = ['utility', 'syntastic']
    plugins {
        syntasticPlugin {
            id = 'com.scuilion.syntastic'
            displayName = 'Syntastic'
            description = 'Integrate syntastic with your gradle projects.'
        } 
    }
}

When I run gradle publishPlugins it generates the pom under publish-generated-resources as follows:

<?xml version="1.0" encoding="UTF-8"?>  
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <groupId>gradle.plugin.com.scuilion.syntastic</groupId>
  <artifactId>gradle-syntastic-plugin</artifactId>
  <version>0.3.1</version>
  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.4</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>

Notice how the groupId has “gradle.plugin” added to the beginning.

<groupId>gradle.plugin.com.scuilion.syntastic</groupId>

If you look at the bintray published pom it has the correct groupId
https://bintray.com/scuilion/maven/gradle-syntastic-plugin/0.2/view#files

You can also see how it translates to the classpath in the plugins repo:
https://plugins.gradle.org/plugin/com.scuilion.syntastic

I feel like I’m missing something simple but just can’t seem to figure it out.

Thanks.

Hi Kevin

Thanks for the question.

You need to add a mavenCoordinates { } block as described on the full example tab of the documentation

Please let us know how you go.

Best

Kon

Thanks this worked for me!