This is an automated email from the ASF dual-hosted git repository.
the-other-tim-brown pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-xtable.git
The following commit(s) were added to refs/heads/main by this push:
new a78b12d9 [701] Keep bundle license texts out of the sources jars
(#1000)
a78b12d9 is described below
commit a78b12d9957816b49eb3afa6c748cb322291d2a3
Author: Tim Brown <[email protected]>
AuthorDate: Tue Nov 3 21:40:42 2026 -0500
[701] Keep bundle license texts out of the sources jars (#1000)
* [701] Keep bundle license texts out of the sources jars
maven-source-plugin packages src/main/resources, so each shaded module's
sources jar still carried LICENSE-bundled, NOTICE-bundled and
META-INF/licenses
next to its own LICENSE and NOTICE. Exclude them as maven-jar-plugin already
does, and have validate_bundled_license_texts.py check sources jars when the
release profile has built them.
* [MINOR] Tighten comments
* [701] Check sources jars in CI, not only after a release build
Move the maven-source-plugin excludes from the release profile into
pluginManagement so a plain source:jar-no-fork applies them, and build sources
jars in the License Check workflow. The validator's sources-jar check
previously found nothing to check in CI.
---
.github/workflows/mvn-license-check.yml | 2 +-
pom.xml | 13 +++++++++++++
release/scripts/validate_bundled_license_texts.py | 2 ++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/mvn-license-check.yml
b/.github/workflows/mvn-license-check.yml
index 6a2e6843..871c0f28 100644
--- a/.github/workflows/mvn-license-check.yml
+++ b/.github/workflows/mvn-license-check.yml
@@ -101,7 +101,7 @@ jobs:
run: >
./mvnw -B -DskipTests -Dmaven.build.cache.enabled=false
-pl
xtable-aws,xtable-hive-metastore,xtable-hudi-support/xtable-hudi-support-extensions,xtable-spark-runtime
- -am package
+ -am package source:jar-no-fork
dependency:tree -DoutputType=text
-DoutputFile=target/dependency-tree.txt
- name: Validate Bundled License Texts
diff --git a/pom.xml b/pom.xml
index dbdd278b..abd1a13d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -700,6 +700,19 @@
</excludes>
</configuration>
</plugin>
+ <!-- Sources jars package src/main/resources too; same
excludes. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>${maven-source-plugin.version}</version>
+ <configuration>
+ <excludes>
+ <exclude>META-INF/LICENSE-bundled</exclude>
+ <exclude>META-INF/NOTICE-bundled</exclude>
+ <exclude>META-INF/licenses/**</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
diff --git a/release/scripts/validate_bundled_license_texts.py
b/release/scripts/validate_bundled_license_texts.py
index 1c385b2c..3270958f 100644
--- a/release/scripts/validate_bundled_license_texts.py
+++ b/release/scripts/validate_bundled_license_texts.py
@@ -406,6 +406,8 @@ def main() -> None:
# The unshaded jar published beside the bundle; none where shade
replaces it.
thin += [jar for jar in (module /
"target").glob(f"{module.name}*.jar")
if not jar.name.endswith(NOT_BUNDLES) and jar not in
found]
+ # Sources jars package src/main/resources too (#701).
+ thin += sorted((module /
"target").glob(f"{module.name}*-sources.jar"))
if not found:
unbuilt.append(module.relative_to(ROOT))
if not jars: