Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 2.28 KB

publishing-info.md

File metadata and controls

48 lines (34 loc) · 2.28 KB

Generate the pom file used for plugin publishing

About the java-gradle-plugin The Java Gradle Plugin development plugin can be used to assist in the development of Gradle plugins.

The java-gradle-plugin generates a plugin publishing task, which we invoke to view the pom file used at plugin publication time:

./gradlew generatePomFileForPluginMavenPublication

More information:

The java-gradle-plugin configures the MavenPluginPublishPlugin and the IvyPluginPublishPlugin when maven-publish or ivy-publish plugins are applied.

The MavenPluginPublishPlugin creates the pluginMaven publication that is then used for publishing the plugin.

See which publications are available

Add the following to your build.gradle to see which publications are available:

build.gradle

task availablePublications {
    project.tasks.each { task ->
        task.doLast {
            publishing.publications.each { println "Task ${task.path} knows about publication named '${it.name}'"}
        }
    }
}

and invoke with:

./gradlew availablePublications

Useful publishing commands to preview generated pom-file/ivy-descriptor

  • publication used for the Gradle plugin portal: generatePomFileForPluginMavenPublication
    • used by Gradle's java-gradle-plugin
  • publication used for internal or local maven repository: generatePomFileForNebulaPublication
  • publication used for internal or local ivy repositoy: generateDescriptorFileForPluginIvyPublication