This is an automated email from the ASF dual-hosted git repository.

snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 60b0f00c8 Maven publication: Produce correct `<scm><tag>` in `pom.xml` 
(#1330)
60b0f00c8 is described below

commit 60b0f00c8ec6785ab2811f9136a9713b58377887
Author: Robert Stupp <[email protected]>
AuthorDate: Tue Apr 8 09:07:09 2025 +0200

    Maven publication: Produce correct `<scm><tag>` in `pom.xml` (#1330)
    
    `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 13ac211a6..6618b9fb2 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) }
 

Reply via email to