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

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


The following commit(s) were added to refs/heads/main by this push:
     new 352b303a72 [CORE] Retain third-party licenses in shaded bundles and 
release archives (#13689)
352b303a72 is described below

commit 352b303a7207a09b05b96d29c4c35c0696465b60
Author: Wei-Ting Chen <[email protected]>
AuthorDate: Fri Nov 20 05:05:48 2026 +0800

    [CORE] Retain third-party licenses in shaded bundles and release archives 
(#13689)
    
    Supply the third-party license texts referenced by LICENSE-binary,
    including the required Checker Framework and SLF4J copyright notices.
    Embed the binary LICENSE/NOTICE and referenced texts in shaded JARs,
    and copy the license directory into binary release tarballs.
    
    Add packaging regressions that exercise the production shade settings
    and release script without requiring a native build.
    
    Co-authored-by: weiting-chen <[email protected]>
    Co-authored-by: Copilot <[email protected]>
    Copilot-Session: f6056c63-28f8-422d-86ce-424f41e2e223
---
 LICENSE-binary                                     |  18 +-
 dev/release/package-release.sh                     |   6 +
 docs/developers/HowToRelease.md                    |  12 ++
 .../test/python/test_binary_licenses.py            | 200 +++++++++++++++++++++
 licenses-binary/LICENSE-EDL-1.0.txt                |  13 ++
 licenses-binary/LICENSE-EPL-1.0.txt                |  70 ++++++++
 licenses-binary/LICENSE-checker-qual.txt           |  22 +++
 licenses-binary/LICENSE-paranamer.txt              |  28 +++
 licenses-binary/LICENSE-protobuf.txt               |  32 ++++
 licenses-binary/LICENSE-slf4j.txt                  |  21 +++
 package/pom.xml                                    |  16 ++
 11 files changed, 429 insertions(+), 9 deletions(-)

diff --git a/LICENSE-binary b/LICENSE-binary
index 3680275b93..b4f375cc6f 100644
--- a/LICENSE-binary
+++ b/LICENSE-binary
@@ -240,23 +240,23 @@ for text of these licenses.
 BSD 3-Clause
 ------------
 
-com.thoughtworks.paranamer:paranamer
-io.glutenproject:protobuf-java
-io.glutenproject:protobuf-java-util
-org.eclipse.collections:eclipse-collections
-org.eclipse.collections:eclipse-collections-api
+com.thoughtworks.paranamer:paranamer (licenses-binary/LICENSE-paranamer.txt)
+com.google.protobuf:protobuf-java (licenses-binary/LICENSE-protobuf.txt)
+com.google.protobuf:protobuf-java-util (licenses-binary/LICENSE-protobuf.txt)
+org.eclipse.collections:eclipse-collections 
(licenses-binary/LICENSE-EDL-1.0.txt)
+org.eclipse.collections:eclipse-collections-api 
(licenses-binary/LICENSE-EDL-1.0.txt)
 
 
 MIT License
 -----------
 
-org.checkerframework:checker-qual
-org.slf4j:slf4j-api
+org.checkerframework:checker-qual (licenses-binary/LICENSE-checker-qual.txt)
+org.slf4j:slf4j-api (licenses-binary/LICENSE-slf4j.txt)
 
 
 Eclipse Public License (EPL) 1.0
 --------------------------------
 
-org.eclipse.collections:eclipse-collections
-org.eclipse.collections:eclipse-collections-api
+org.eclipse.collections:eclipse-collections 
(licenses-binary/LICENSE-EPL-1.0.txt)
+org.eclipse.collections:eclipse-collections-api 
(licenses-binary/LICENSE-EPL-1.0.txt)
 
diff --git a/dev/release/package-release.sh b/dev/release/package-release.sh
index 21a772bd06..bcf10d4e54 100755
--- a/dev/release/package-release.sh
+++ b/dev/release/package-release.sh
@@ -42,12 +42,17 @@ fi
 # distribution must ship the LICENSE/NOTICE that cover it.
 LICENSE_BINARY="${GLUTEN_HOME}/LICENSE-binary"
 NOTICE_BINARY="${GLUTEN_HOME}/NOTICE-binary"
+LICENSES_BINARY="${GLUTEN_HOME}/licenses-binary"
 for f in "$LICENSE_BINARY" "$NOTICE_BINARY"; do
   if [[ ! -f "$f" ]]; then
     echo "Missing $f, required for the binary distribution."
     exit 1
   fi
 done
+if [[ ! -d "$LICENSES_BINARY" ]]; then
+  echo "Missing $LICENSES_BINARY, required for the binary distribution."
+  exit 1
+fi
 
 pushd $GLUTEN_HOME/release/
 
@@ -77,6 +82,7 @@ for v in $SPARK_VERSIONS; do
   cp "$JAR" "${BIN_DIR}/"
   cp "$LICENSE_BINARY" "${BIN_DIR}/LICENSE"
   cp "$NOTICE_BINARY" "${BIN_DIR}/NOTICE"
+  cp -R "$LICENSES_BINARY" "${BIN_DIR}/licenses-binary"
   tar -czf "${BIN_DIR}.tar.gz" "${BIN_DIR}"
   rm -rf "${BIN_DIR}"
 done
diff --git a/docs/developers/HowToRelease.md b/docs/developers/HowToRelease.md
index fe5c60ec5a..7d3ddfea90 100644
--- a/docs/developers/HowToRelease.md
+++ b/docs/developers/HowToRelease.md
@@ -66,6 +66,18 @@ requires cutting a new candidate.
 The bundle JAR statically links third-party code, and `package-release.sh` 
ships `LICENSE-binary`
 and `NOTICE-binary` inside each binary tarball as `LICENSE` and `NOTICE`. 
Whenever a bundled
 component is added or enabled, its copyright and license must be recorded 
there.
+The third-party license texts and copyright notices referenced by 
`LICENSE-binary`
+are kept in `licenses-binary/`. The package build includes the binary 
LICENSE/NOTICE
+and these texts under `META-INF/` in the shaded JAR, and the release script 
also
+copies `licenses-binary/` into each binary tarball. Keep these files in sync 
when
+updating bundled dependencies; listing a license name alone does not retain the
+dependency's required notices.
+
+Run the packaging regression tests without building the native backend:
+
+```bash
+python3 -m unittest discover -s gluten-ut/src-release/test/python -v
+```
 
 A previous RC was voted `-1` because Hudi and Paimon had been enabled in the 
binaries without
 being added to `NOTICE-binary`.
diff --git a/gluten-ut/src-release/test/python/test_binary_licenses.py 
b/gluten-ut/src-release/test/python/test_binary_licenses.py
new file mode 100644
index 0000000000..84c1a158fd
--- /dev/null
+++ b/gluten-ut/src-release/test/python/test_binary_licenses.py
@@ -0,0 +1,200 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import copy
+import os
+from pathlib import Path
+import re
+import shutil
+import subprocess
+import tarfile
+import tempfile
+import unittest
+import xml.etree.ElementTree as ET
+import zipfile
+
+
+ROOT = Path(__file__).resolve().parents[4]
+NS = {"m": "http://maven.apache.org/POM/4.0.0"}
+ET.register_namespace("", NS["m"])
+
+
+def element(parent, name, text=None):
+    child = ET.SubElement(parent, f"{{{NS['m']}}}{name}")
+    child.text = text
+    return child
+
+
+class BinaryLicensesTest(unittest.TestCase):
+    def setUp(self):
+        temporary = tempfile.TemporaryDirectory()
+        self.addCleanup(temporary.cleanup)
+        self.root = Path(temporary.name)
+        for name in ("LICENSE-binary", "NOTICE-binary"):
+            shutil.copyfile(ROOT / name, self.root / name)
+        shutil.copytree(ROOT / "licenses-binary", self.root / 
"licenses-binary")
+
+    def assert_license_references(self, license_text, read):
+        references = re.findall(r"\((licenses-binary/[^)]+)\)", license_text)
+        self.assertTrue(references, "Binary LICENSE must point to its license 
texts")
+        for name in references:
+            self.assertEqual(read(name), (ROOT / name).read_bytes())
+        checker = read("licenses-binary/LICENSE-checker-qual.txt").decode()
+        self.assertIn("Copyright 2004-present by the Checker Framework 
developers", checker)
+        self.assertIn("this permission notice shall be included", checker)
+        slf4j = read("licenses-binary/LICENSE-slf4j.txt").decode()
+        self.assertIn("Copyright (c) 2004-2022 QOS.ch", slf4j)
+        self.assertIn("this permission notice shall be", slf4j)
+
+    def test_shaded_jar_retains_binary_licenses(self):
+        production = ET.parse(ROOT / "package/pom.xml").getroot()
+        parent = ET.parse(ROOT / "pom.xml").getroot()
+        shade = production.find(
+            "m:build/m:plugins/m:plugin[m:artifactId='maven-shade-plugin']", NS
+        )
+        shade_version = parent.find(
+            "m:build/m:pluginManagement/m:plugins/"
+            "m:plugin[m:artifactId='maven-shade-plugin']/m:version", NS
+        ).text
+        for bundle_slf4j in (True, False):
+            with self.subTest(bundle_slf4j=bundle_slf4j):
+                directory = self.root / ("with-slf4j" if bundle_slf4j else 
"without-slf4j")
+                directory.mkdir()
+                project = ET.Element(f"{{{NS['m']}}}project")
+                for key, value in (
+                    ("modelVersion", "4.0.0"),
+                    ("groupId", "org.apache.gluten"),
+                    ("artifactId", "license-packaging-test"),
+                    ("version", "1.0"),
+                ):
+                    element(project, key, value)
+                properties = element(project, "properties")
+                element(properties, "gluten.shade.packageName", 
"org.apache.gluten.shaded")
+                dependencies = element(project, "dependencies")
+                for group, artifact, version, scope in (
+                    ("org.checkerframework", "checker-qual", "3.33.0", 
"compile"),
+                    ("org.slf4j", "slf4j-api", "2.0.6",
+                     "compile" if bundle_slf4j else "provided"),
+                ):
+                    dependency = element(dependencies, "dependency")
+                    for key, value in (
+                        ("groupId", group), ("artifactId", artifact),
+                        ("version", version), ("scope", scope),
+                    ):
+                        element(dependency, key, value)
+                build = element(project, "build")
+                resources = 
copy.deepcopy(production.find("m:build/m:resources", NS))
+                build.append(resources)
+                conflicting = directory / "input-resources/META-INF"
+                conflicting.mkdir(parents=True)
+                for name in ("LICENSE", "NOTICE"):
+                    (conflicting / name).write_text("upstream Apache-only 
metadata\n")
+                resource = element(resources, "resource")
+                element(resource, "directory", str(conflicting.parent))
+                plugins = element(build, "plugins")
+                plugin = copy.deepcopy(shade)
+                element(plugin, "version", shade_version)
+                plugins.append(plugin)
+                ET.ElementTree(project).write(directory / "pom.xml", 
encoding="utf-8")
+                command = [str(ROOT / "build/mvn"), "-B", "-q"]
+                settings = os.environ.get("MAVEN_SETTINGS")
+                if settings:
+                    command.extend(["-s", settings])
+                command.extend(["-f", str(directory / "pom.xml"), "package"])
+                result = subprocess.run(
+                    command, cwd=ROOT, text=True, stdout=subprocess.PIPE,
+                    stderr=subprocess.STDOUT, timeout=300,
+                )
+                self.assertEqual(result.returncode, 0, result.stdout)
+                with zipfile.ZipFile(directory / 
"target/gluten-package-1.0.jar") as jar:
+                    self.assertIn(
+                        
"org/checkerframework/checker/builder/qual/CalledMethods.class",
+                        jar.namelist(),
+                    )
+                    self.assertEqual(
+                        "org/slf4j/Logger.class" in jar.namelist(), 
bundle_slf4j
+                    )
+                    self.assertEqual(
+                        len(jar.namelist()), len(set(jar.namelist())),
+                        "Shading must not create duplicate license entries",
+                    )
+                    self.assertEqual(
+                        jar.read("META-INF/LICENSE"), (ROOT / 
"LICENSE-binary").read_bytes()
+                    )
+                    self.assertEqual(
+                        jar.read("META-INF/NOTICE"), (ROOT / 
"NOTICE-binary").read_bytes()
+                    )
+                    self.assert_license_references(
+                        jar.read("META-INF/LICENSE").decode(),
+                        lambda name: jar.read("META-INF/" + name),
+                    )
+
+    def test_release_fails_when_license_directory_is_missing(self):
+        script_directory = self.root / "dev/release"
+        script_directory.mkdir(parents=True)
+        script = script_directory / "package-release.sh"
+        shutil.copyfile(ROOT / "dev/release/package-release.sh", script)
+        (self.root / "release").mkdir()
+        (self.root / "licenses-binary").rename(self.root / "missing-licenses")
+        result = subprocess.run(
+            ["bash", str(script), "v1.0-rc0"], text=True,
+            stdout=subprocess.PIPE, stderr=subprocess.STDOUT, timeout=30,
+        )
+        self.assertNotEqual(result.returncode, 0)
+        self.assertIn("licenses-binary, required for the binary distribution", 
result.stdout)
+
+    def test_release_tarballs_include_referenced_licenses(self):
+        script_directory = self.root / "dev/release"
+        script_directory.mkdir(parents=True)
+        script = script_directory / "package-release.sh"
+        shutil.copyfile(ROOT / "dev/release/package-release.sh", script)
+        release = self.root / "release"
+        release.mkdir()
+        script_text = script.read_text()
+        versions = re.search(r'SPARK_VERSIONS="([^"]+)"', 
script_text).group(1).split()
+        for version in versions:
+            scala = "2.13" if version.startswith("4.") else "2.12"
+            jar = release / 
f"gluten-velox-bundle-spark{version}_{scala}-linux_amd64-1.0.jar"
+            with zipfile.ZipFile(jar, "w"):
+                pass
+        source_zip = self.root / "source.zip"
+        with zipfile.ZipFile(source_zip, "w") as archive:
+            archive.writestr("gluten-1.0-rc0/README", "release packaging 
fixture\n")
+        commands = self.root / "bin"
+        commands.mkdir()
+        wget = commands / "wget"
+        wget.write_text('#!/bin/sh\ncp "$SOURCE_ZIP" "$(basename "$1")"\n')
+        wget.chmod(0o755)
+        environment = dict(
+            os.environ, PATH=str(commands) + os.pathsep + os.environ["PATH"],
+            SOURCE_ZIP=str(source_zip),
+        )
+        result = subprocess.run(
+            ["bash", str(script), "v1.0-rc0"], env=environment,
+            text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, 
timeout=60,
+        )
+        self.assertEqual(result.returncode, 0, result.stdout)
+        for version in versions:
+            with self.subTest(spark=version):
+                prefix = f"apache-gluten-1.0-bin-spark-{version}/"
+                with tarfile.open(release / f"{prefix[:-1]}.tar.gz") as 
archive:
+                    self.assert_license_references(
+                        archive.extractfile(prefix + 
"LICENSE").read().decode(),
+                        lambda name: archive.extractfile(prefix + name).read(),
+                    )
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/licenses-binary/LICENSE-EDL-1.0.txt 
b/licenses-binary/LICENSE-EDL-1.0.txt
new file mode 100644
index 0000000000..4e492acbfa
--- /dev/null
+++ b/licenses-binary/LICENSE-EDL-1.0.txt
@@ -0,0 +1,13 @@
+Eclipse Distribution License - v 1.0
+
+Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without 
modification, are permitted provided that the following conditions are met:
+
+    Redistributions of source code must retain the above copyright notice, 
this list of conditions and the following disclaimer.
+    Redistributions in binary form must reproduce the above copyright notice, 
this list of conditions and the following disclaimer in the documentation 
and/or other materials provided with the distribution.
+    Neither the name of the Eclipse Foundation, Inc. nor the names of its 
contributors may be used to endorse or promote products derived from this 
software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
LOSS OF USE, DATA, OR PROFI [...]
diff --git a/licenses-binary/LICENSE-EPL-1.0.txt 
b/licenses-binary/LICENSE-EPL-1.0.txt
new file mode 100644
index 0000000000..79e486c3d2
--- /dev/null
+++ b/licenses-binary/LICENSE-EPL-1.0.txt
@@ -0,0 +1,70 @@
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC 
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM 
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation 
distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate from and are 
distributed by that particular Contributor. A Contribution 'originates' from a 
Contributor if it was added to the Program by such Contributor itself or anyone 
acting on such Contributor's behalf. Contributions do not include additions to 
the Program which: (i) are separate modules of software distributed in 
conjunction with the Program under their own license agreement, and (ii) are 
not derivative works of the Program.
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are 
necessarily infringed by the use or sale of its Contribution alone or when 
combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this 
Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, 
including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants 
Recipient a non-exclusive, worldwide, royalty-free copyright license to 
reproduce, prepare derivative works of, publicly display, publicly perform, 
distribute and sublicense the Contribution of such Contributor, if any, and 
such derivative works, in source code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby grants 
Recipient a non-exclusive, worldwide, royalty-free patent license under 
Licensed Patents to make, use, sell, offer to sell, import and otherwise 
transfer the Contribution of such Contributor, if any, in source code and 
object code form. This patent license shall apply to the combination of the 
Contribution and the Program if, at the time the Contribution is added by the 
Contributor, such addition of the Contributio [...]
+c) Recipient understands that although each Contributor grants the licenses to 
its Contributions set forth herein, no assurances are provided by any 
Contributor that the Program does not infringe the patent or other intellectual 
property rights of any other entity. Each Contributor disclaims any liability 
to Recipient for claims brought by any other entity based on infringement of 
intellectual property rights or otherwise. As a condition to exercising the 
rights and licenses granted here [...]
+d) Each Contributor represents that to its knowledge it has sufficient 
copyright rights in its Contribution, if any, to grant the copyright license 
set forth in this Agreement.
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under 
its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and 
conditions, express and implied, including warranties or conditions of title 
and non-infringement, and implied warranties or conditions of merchantability 
and fitness for a particular purpose;
+ii) effectively excludes on behalf of all Contributors all liability for 
damages, including direct, indirect, special, incidental and consequential 
damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement are offered 
by that Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from such 
Contributor, and informs licensees how to obtain it in a reasonable manner on 
or through a medium customarily used for software exchange.
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
+Contributors may not remove or alter any copyright notices contained within 
the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, 
if any, in a manner that reasonably allows subsequent Recipients to identify 
the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with 
respect to end users, business partners and the like. While this license is 
intended to facilitate the commercial use of the Program, the Contributor who 
includes the Program in a commercial product offering should do so in a manner 
which does not create potential liability for other Contributors. Therefore, if 
a Contributor includes the Program in a commercial product offering, such 
Contributor ("Commercial Con [...]
+
+For example, a Contributor might include the Program in a commercial product 
offering, Product X. That Contributor is then a Commercial Contributor. If that 
Commercial Contributor then makes performance claims, or offers warranties 
related to Product X, those performance claims and warranties are such 
Commercial Contributor's responsibility alone. Under this section, the 
Commercial Contributor would have to defend claims against the other 
Contributors related to those performance claims  [...]
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN 
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, 
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each 
Recipient is solely responsible for determining the appropriateness of using 
and distributing the Program and assumes all risks associated with its exercise 
of rights under this Ag [...]
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY 
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST 
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY 
WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS 
GRANTED HEREUNDER, EVEN IF [...]
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under 
applicable law, it shall not affect the validity or enforceability of the 
remainder of the terms of this Agreement, and without further action by the 
parties hereto, such provision shall be reformed to the minimum extent 
necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a 
cross-claim or counterclaim in a lawsuit) alleging that the Program itself 
(excluding combinations of the Program with other software or hardware) 
infringes such Recipient's patent(s), then such Recipient's rights granted 
under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to 
comply with any of the material terms or conditions of this Agreement and does 
not cure such failure in a reasonable period of time after becoming aware of 
such noncompliance. If all Recipient's rights under this Agreement terminate, 
Recipient agrees to cease use and distribution of the Program as soon as 
reasonably practicable. However, Recipient's obligations under this Agreement 
and any licenses granted by Reci [...]
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in 
order to avoid inconsistency the Agreement is copyrighted and may only be 
modified in the following manner. The Agreement Steward reserves the right to 
publish new versions (including revisions) of this Agreement from time to time. 
No one other than the Agreement Steward has the right to modify this Agreement. 
The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation 
may assign the respons [...]
+
+This Agreement is governed by the laws of the State of New York and the 
intellectual property laws of the United States of America. No party to this 
Agreement will bring a legal action under this Agreement more than one year 
after the cause of action arose. Each party waives its rights to a jury trial 
in any resulting litigation.
diff --git a/licenses-binary/LICENSE-checker-qual.txt 
b/licenses-binary/LICENSE-checker-qual.txt
new file mode 100644
index 0000000000..9837c6b69f
--- /dev/null
+++ b/licenses-binary/LICENSE-checker-qual.txt
@@ -0,0 +1,22 @@
+Checker Framework qualifiers
+Copyright 2004-present by the Checker Framework developers
+
+MIT License:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/licenses-binary/LICENSE-paranamer.txt 
b/licenses-binary/LICENSE-paranamer.txt
new file mode 100644
index 0000000000..522176fbca
--- /dev/null
+++ b/licenses-binary/LICENSE-paranamer.txt
@@ -0,0 +1,28 @@
+[ ParaNamer used to be 'Pubic Domain', but since it includes a small piece of 
ASM it is now the same license as that: BSD ]
+
+ Copyright (c) 2006 Paul Hammant & ThoughtWorks Inc
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the copyright holders nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/licenses-binary/LICENSE-protobuf.txt 
b/licenses-binary/LICENSE-protobuf.txt
new file mode 100644
index 0000000000..19b305b000
--- /dev/null
+++ b/licenses-binary/LICENSE-protobuf.txt
@@ -0,0 +1,32 @@
+Copyright 2008 Google Inc.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+    * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Code generated by the Protocol Buffer compiler is owned by the owner
+of the input file used when generating it.  This code is not
+standalone and requires a support library to be linked with it.  This
+support library is itself covered by the above license.
diff --git a/licenses-binary/LICENSE-slf4j.txt 
b/licenses-binary/LICENSE-slf4j.txt
new file mode 100644
index 0000000000..a6868291fc
--- /dev/null
+++ b/licenses-binary/LICENSE-slf4j.txt
@@ -0,0 +1,21 @@
+Copyright (c) 2004-2022 QOS.ch
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/package/pom.xml b/package/pom.xml
index 3bb4c1a06e..047f8d8bcb 100644
--- a/package/pom.xml
+++ b/package/pom.xml
@@ -55,6 +55,10 @@
 
   <build>
     <resources>
+      <resource>
+        <targetPath>META-INF/licenses-binary</targetPath>
+        <directory>../licenses-binary</directory>
+      </resource>
       <resource>
         <directory>../gluten-core/target/generated-resources/</directory>
         <includes>
@@ -77,6 +81,16 @@
             <phase>package</phase>
             <configuration>
               <createSourcesJar>true</createSourcesJar>
+              <transformers>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+                  <resource>META-INF/LICENSE</resource>
+                  <file>${project.basedir}/../LICENSE-binary</file>
+                </transformer>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
+                  <resource>META-INF/NOTICE</resource>
+                  <file>${project.basedir}/../NOTICE-binary</file>
+                </transformer>
+              </transformers>
               <relocations>
                 <relocation>
                   <pattern>com.google.protobuf</pattern>
@@ -149,6 +163,8 @@
                     <exclude>META-INF/*.DSA</exclude>
                     <exclude>META-INF/*.RSA</exclude>
                     <exclude>META-INF/DEPENDENCIES</exclude>
+                    <exclude>META-INF/LICENSE</exclude>
+                    <exclude>META-INF/NOTICE</exclude>
                     <exclude>META-INF/LICENSE.txt</exclude>
                     <exclude>META-INF/NOTICE.txt</exclude>
                     <exclude>LICENSE.txt</exclude>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to