From 737570f46aa740af0261657ee1ba9ed803bab8e8 Mon Sep 17 00:00:00 2001 From: Robert Stupp Date: Mon, 7 Apr 2025 10:23:19 +0200 Subject: [PATCH] Maven publication: Produce correct `` in `pom.xml` `project.scm.tag` in a Maven pom is intended to refer to the SCM (Git) tag. We currently publish `main`, which is incorrect. This change omits the SCM tag for snapshot builds, but emits the Git tag for releases. --- build-logic/src/main/kotlin/publishing/configurePom.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-logic/src/main/kotlin/publishing/configurePom.kt b/build-logic/src/main/kotlin/publishing/configurePom.kt index 13ac211a66..6618b9fb27 100644 --- a/build-logic/src/main/kotlin/publishing/configurePom.kt +++ b/build-logic/src/main/kotlin/publishing/configurePom.kt @@ -103,7 +103,10 @@ internal fun configurePom(project: Project, mavenPublication: MavenPublication, connection.set("scm:git:$codeRepo") developerConnection.set("scm:git:$codeRepo") url.set("$codeRepo/tree/main") - tag.set("main") + val version = project.version.toString() + if (!version.endsWith("-SNAPSHOT")) { + tag.set("apache-polaris-$version") + } } issueManagement { url.set(projectPeople.bugDatabase) }