Closed psibre closed 6 years ago
Duplicate of https://github.com/gradle/gradle/issues/2650. There's also a workaround there. Let me know if that helps.
@oehme Thanks so much for your fast response! The workaround pointed me to the solution of adding an explicit group: '*'
to the groovy-all
dependency exclusion.
Expected Behavior
Publishing a plugin to the Gradle Plugin Portal using the
com.gradle.plugin-publish version 0.9.9
plugin should produce the same POM as when performing a normal publish using themaven-publish
plugin (except for thegradle.plugin
group prefix).Current Behavior
Publishing a plugin with transitive dependencies excluded causes different POMs to be generated and published. For our plugin https://github.com/marytts/gradle-marytts-voicebuilding-plugin/tree/v5.3.1, this is the POM published using the
maven-publish
plugin:It is online at https://dl.bintray.com/marytts/marytts/de/dfki/mary/gradle-marytts-voicebuilding-plugin/5.3.1/gradle-marytts-voicebuilding-plugin-5.3.1.pom
The same plugin published from the same repo/tag to the Gradle plugin portal gets this POM generated:
This is online at https://plugins-artifacts.gradle.org/gradle.plugin.de.dfki.mary/gradle-marytts-voicebuilding-plugin/5.3.1/de548924749d147da0cf4ec1077c93d52193d2aa181d6fcb6e595987b9908ddf/gradle-marytts-voicebuilding-plugin-5.3.1.pom
To highlight the differences:
Context
As mentioned in marytts/gradle-marytts-voicebuilding-plugin#95, the exclusion of the leaked, transitive
groovy-all
dependency causes a project applying this plugin to fail with errors when the Gradle Worker API is used.Excluding
groovy-all
fixes this issue, but only if the plugin is resolved from Bintray. Apparently the subtly different exclusion syntax in the POM generated by theplugin-publish
plugin causesgroovy-all
to not be excluded as intended.Steps to Reproduce (for bugs)
Create a
build.gradle
:Run
gradle buildEnvironment
Root project
classpath +--- de.dfki.mary.voicebuilding-legacy:de.dfki.mary.voicebuilding-legacy.gradle.plugin:5.3.1 | --- gradle.plugin.de.dfki.mary:gradle-marytts-voicebuilding-plugin:5.3.1 | +--- de.dfki.mary:marytts-runtime:5.2 | | +--- de.dfki.mary:marytts-common:5.2 | | | +--- commons-lang:commons-lang:2.6 | | | +--- commons-io:commons-io:2.5 | | | +--- log4j:log4j:1.2.16 | | | +--- com.twmacinta:fast-md5:2.7.1 | | | --- org.codehaus.groovy:groovy-all:2.4.5 | | +--- de.dfki.mary:marytts-signalproc:5.2 | | | +--- de.dfki.mary:marytts-common:5.2 (*) | | | +--- gov.nist.math:Jampack:1.0 | | | +--- gov.nist.math:jama:1.0.3 | | | --- org.swinglabs:swing-layout:1.0.3
gradle buildEnvironment
againRoot project
classpath +--- de.dfki.mary.voicebuilding-legacy:de.dfki.mary.voicebuilding-legacy.gradle.plugin:5.3.1 | --- de.dfki.mary:gradle-marytts-voicebuilding-plugin:5.3.1 | +--- de.dfki.mary:marytts-runtime:5.2 | | +--- de.dfki.mary:marytts-common:5.2 | | | +--- commons-lang:commons-lang:2.6 | | | +--- commons-io:commons-io:2.5 | | | +--- log4j:log4j:1.2.16 | | | --- com.twmacinta:fast-md5:2.7.1 | | +--- de.dfki.mary:marytts-signalproc:5.2 | | | +--- de.dfki.mary:marytts-common:5.2 (*) | | | +--- gov.nist.math:Jampack:1.0 | | | +--- gov.nist.math:jama:1.0.3 | | | --- org.swinglabs:swing-layout:1.0.3