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 b389c39cfc Spark Plugin: Do not add default META-INF/LICENSE+NOTICE to 
plugin jar (#3912)
b389c39cfc is described below

commit b389c39cfcc2d3b89307f21cc43fbdaf29b0f215
Author: Robert Stupp <[email protected]>
AuthorDate: Tue Mar 3 18:15:57 2026 +0100

    Spark Plugin: Do not add default META-INF/LICENSE+NOTICE to plugin jar 
(#3912)
---
 build-logic/src/main/kotlin/polaris-java.gradle.kts     | 17 +++++++++++++++++
 build-logic/src/main/kotlin/publishing/maven-utils.kt   | 14 --------------
 build.gradle.kts                                        |  3 ++-
 .../spark/v3.5/spark/src/main/no-license-notice-marker  |  1 +
 4 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/build-logic/src/main/kotlin/polaris-java.gradle.kts 
b/build-logic/src/main/kotlin/polaris-java.gradle.kts
index 43d6f0ccb9..f4ed1403ba 100644
--- a/build-logic/src/main/kotlin/polaris-java.gradle.kts
+++ b/build-logic/src/main/kotlin/polaris-java.gradle.kts
@@ -209,6 +209,23 @@ tasks.withType<Jar>().configureEach {
       "Implementation-URL" to "https://polaris.apache.org/";,
     )
   }
+
+  if (!project.file("src/main/no-license-notice-marker").exists()) {
+    if (!project.file("src/main/resources/META-INF/LICENSE").exists()) {
+      from(rootProject.rootDir) {
+        include("gradle/jar-licenses/LICENSE").eachFile { path = 
"META-INF/$sourceName" }
+      }
+    } else if (name == "javadocJar") {
+      from("src/main/resources") { include("META-INF/LICENSE") }
+    }
+    if (!project.file("src/main/resources/META-INF/NOTICE").exists()) {
+      from(rootProject.rootDir) {
+        include("gradle/jar-licenses/NOTICE").eachFile { path = 
"META-INF/$sourceName" }
+      }
+    } else if (name == "javadocJar") {
+      from("src/main/resources") { include("META-INF/NOTICE") }
+    }
+  }
 }
 
 dependencies { 
errorprone(versionCatalogs.named("libs").findLibrary("errorprone").get()) }
diff --git a/build-logic/src/main/kotlin/publishing/maven-utils.kt 
b/build-logic/src/main/kotlin/publishing/maven-utils.kt
index 9be9ffe503..5a04448814 100644
--- a/build-logic/src/main/kotlin/publishing/maven-utils.kt
+++ b/build-logic/src/main/kotlin/publishing/maven-utils.kt
@@ -78,20 +78,6 @@ fun addAdditionalJarContent(project: Project): Unit =
         tasks.register("generatePomProperties", 
GeneratePomProperties::class.java) {}
 
       tasks.withType(Jar::class).configureEach {
-        if (!project.file("src/main/resources/META-INF/LICENSE").exists()) {
-          from(rootProject.rootDir) {
-            include("gradle/jar-licenses/LICENSE").eachFile { path = 
"META-INF/$sourceName" }
-          }
-        } else if (name == "javadocJar") {
-          from("src/main/resources") { include("META-INF/LICENSE") }
-        }
-        if (!project.file("src/main/resources/META-INF/NOTICE").exists()) {
-          from(rootProject.rootDir) {
-            include("gradle/jar-licenses/NOTICE").eachFile { path = 
"META-INF/$sourceName" }
-          }
-        } else if (name == "javadocJar") {
-          from("src/main/resources") { include("META-INF/NOTICE") }
-        }
         // Only add the pom.xml to jars for 'release' builds, but not for 
developer/snapshot builds.
         // Letting jars depend on the pom.xml (Gradle's `GenerateMavenPom` 
task, annotated with
         // `@UntrackedTask`)
diff --git a/build.gradle.kts b/build.gradle.kts
index d455840870..322cb783f8 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -63,10 +63,11 @@ tasks.named<RatTask>("rat").configure {
   excludes.add("ide-name.txt")
   excludes.add("version.txt")
 
-  excludes.add("DISCLAIMER_WIP")
   excludes.add("LICENSE")
   excludes.add("NOTICE")
 
+  excludes.add("**/no-license-notice-marker")
+
   // Files copied from Docsy (ASLv2 licensed) don't have header
   excludes.add("site/layouts/docs/baseof.html")
   excludes.add("site/layouts/guides/baseof.html")
diff --git a/plugins/spark/v3.5/spark/src/main/no-license-notice-marker 
b/plugins/spark/v3.5/spark/src/main/no-license-notice-marker
new file mode 100644
index 0000000000..c4b25497f1
--- /dev/null
+++ b/plugins/spark/v3.5/spark/src/main/no-license-notice-marker
@@ -0,0 +1 @@
+Marker file to let `polaris-java.gradle.kts` NOT add default META-INF/LICENSE 
and  META-INF/NOTICE files.

Reply via email to