Ruth
07/03/2024, 12:00 PMpublishing {
publications {
register("pluginMaven", MavenPublication::class) {
pom {
url.set("<https://github.com/europace/docker-publish-gradle-plugin>")
}
}
register("dockerPublishPluginPluginMarkerMaven", MavenPublication::class) {
pom {
url.set("<https://github.com/europace/docker-publish-gradle-plugin>")
}
}
}
}
}
But I get the error:
> Cannot add a Publication with name 'dockerPublishPluginPluginMarkerMaven' as a Publication with that name already exists.
Any idea what I am doing wrong?
I could not find any documentation about the adaption of the pom file.
Here they mention the publications, but I do not understand how to enrich the root pom fileVampire
07/03/2024, 1:26 PMregister you try to also create them and thus get the error that the publication already exists.
Use named(...) instead of register(...) to get the already existing publication and then just configure that already existing publication.Ruth
07/04/2024, 10:35 AMregister to named I get this error:
Publication with name 'dockerPublishPluginPluginMarkerMaven' not found.
Any Idea what I am doing wrong?
The whole plugin section is:
gradlePlugin {
website.set("<https://github.com/europace/docker-publish-gradle-plugin>")
vcsUrl.set("<https://github.com/europace/docker-publish-gradle-plugin>")
plugins {
create("dockerPublishPlugin") {
id = "de.europace.docker-publish"
displayName = "Docker Publish Plugin"
description = "Adds tasks to create and publish a Docker image to a registry"
implementationClass = "de.europace.gradle.docker.publish.DockerPublishPlugin"
tags.set(listOf("docker", "publish", "publishing"))
}
}
publishing {
publications {
named("dockerPublishPluginPluginMarkerMaven", MavenPublication::class) {
pom {
url.set("<https://github.com/europace/docker-publish-gradle-plugin>")
}
}
}
}
}Vampire
07/04/2024, 11:49 AMpublications.withType(MavenPublication::class).configureEach { ... }.
If not, then something like publications.withType(MavenPublication::class).named { it == "..." }.configureEach { ... }.Ruth
07/15/2024, 7:06 AMRuth
07/15/2024, 10:12 AMVampire
07/15/2024, 10:33 AMVampire
07/15/2024, 10:35 AMRuth
07/15/2024, 10:48 AMRuth
07/15/2024, 10:49 AMVampire
07/15/2024, 10:58 AMRuth
07/15/2024, 11:01 AMRuth
07/17/2024, 7:16 AMPhilip W
07/17/2024, 3:55 PMVampire
07/17/2024, 4:11 PMRuth
07/18/2024, 7:28 AMRuth
07/29/2024, 9:39 AMRuth
10/21/2024, 7:34 AMThomas Broyer
10/21/2024, 8:16 AMRuth
10/21/2024, 8:28 AMThomas Broyer
10/21/2024, 8:32 AMThomas Broyer
10/21/2024, 8:33 AMRuth
10/21/2024, 8:47 AM