Closed wsargent closed 4 years ago
I experienced this as well.
Execution failed for task ':publishJavaLibraryPublicationToMavenLocal'.
> Failed to publish publication 'javaLibrary' to repository 'mavenLocal'
> Invalid publication 'javaLibrary': POM file is invalid. Check any modifications you have made to the POM file.
Duplicated tag: 'packaging' (position: START_TAG seen ...</name>\r\n <packaging>... @646:14)
After clearing artifacts and adding just jar
and sources
, I get this new error:
Duplicated tag: 'dependencies' (position: START_TAG seen ...</ciManagement>\r\n <dependencies>...@47:17)
This also happens when using a subproject's task, for example:
def gradlePluginJar = tasks.getByPath(':gradle-plugin:jar')
gradlePluginJar.getArchiveClassifier().set("gradle-plugin")
artifacts {
add("archives", gradlePluginJar)
}
If you add
archiveClassifier.set
to thebuild.gradle
file:then you get on
gradle build
:Project replicating the issue here:
https://github.com/wsargent/shipkit-bootstrap