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

jinsongzhou pushed a commit to branch 0.7.x
in repository https://gitbox.apache.org/repos/asf/amoro.git

commit 2ed6316ebc40f9d11eee704820bba9c0eb58a826
Author: ZhouJinsong <[email protected]>
AuthorDate: Mon Jul 1 17:56:14 2024 +0800

    [Improvement] Add NOTICE-binary & LICENSE-binary for binary release (#2985)
    
    * Add NOTICE-binary & LICENSE-binary files
    
    * Remove useless plugin
    
    * Rollback dependency change
    
    * Fix rat plugin check rules
---
 LICENSE                                            |   5 +-
 LICENSE => LICENSE-binary                          | 218 ++++++++++++++++++++-
 NOTICE-binary                                      |  79 ++++++++
 amoro-ams/dist/src/main/assemblies/bin.xml         |  11 +-
 .../amoro-mixed-format-spark-3-common/pom.xml      |   2 +
 .../v3.2/amoro-mixed-format-spark-3.2/pom.xml      |   2 +
 licenses-binary/LICENSE.asm                        |  31 +++
 licenses-binary/LICENSE.base64                     |  26 +++
 .../LICENSE.checker-framework-qualifiers           |  22 +++
 licenses-binary/LICENSE.dnsjava                    |  30 +++
 licenses-binary/LICENSE.janino                     |  31 +++
 licenses-binary/LICENSE.jaxb                       | 135 +++++++++++++
 licenses-binary/LICENSE.jsr166y                    |  26 +++
 licenses-binary/LICENSE.jzlib                      |  26 +++
 licenses-binary/LICENSE.webbit                     |  38 ++++
 pom.xml                                            |   9 +
 tools/releasing/NOTICE-binary_PREAMBLE.txt         |   7 +
 tools/releasing/collect_license_files.sh           |  65 ++++++
 18 files changed, 755 insertions(+), 8 deletions(-)

diff --git a/LICENSE b/LICENSE
index 4745cbad1..f49a4e16e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,3 @@
-
                                  Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/
@@ -199,6 +198,4 @@
    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.
-
---------------------------------------------------------------------------------
\ No newline at end of file
+   limitations under the License.
\ No newline at end of file
diff --git a/LICENSE b/LICENSE-binary
similarity index 64%
copy from LICENSE
copy to LICENSE-binary
index 4745cbad1..a27ade7fa 100644
--- a/LICENSE
+++ b/LICENSE-binary
@@ -1,4 +1,3 @@
-
                                  Apache License
                            Version 2.0, January 2004
                         http://www.apache.org/licenses/
@@ -201,4 +200,219 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
---------------------------------------------------------------------------------
\ No newline at end of file
+------------------------------------------------------------------------------------
+This product bundles various third-party components under other open source 
licenses.
+This section summarizes those components and their licenses. See licenses/
+for text of these licenses.
+
+Apache License Version 2.0
+--------------------------
+org.apache.arrow:arrow-*
+org.apache.avro:avro-*
+org.apache.commons:commons-*
+org.apache.curator:curator-*
+org.apache.flink:flink-*
+org.apache.hadoop:hadoop-*
+org.apache.hive:hive-*
+org.apache.iceberg:iceberg-*
+org.apache.kerby:kerby-*
+org.apache.logging.log4j:log4j-*
+org.apache.paimon:paimon-*
+org.apache.spark:spark-*
+org.apache.derby:derby
+org.apache.httpcomponents:httpclient
+org.apache.httpcomponents:httpcore
+org.apache.httpcomponents.client5:httpclient5
+org.apache.httpcomponents.core5:httpcore5
+org.apache.httpcomponents.core5:httpcore5-h2
+org.apache.kyuubi:kyuubi-hive-jdbc-shaded
+org.apache.thrift:libfb303
+org.apache.thrift:libthrift
+org.apache.yetus:audience-annotations
+org.apache.zookeeper:zookeeper
+org.apache.zookeeper:zookeeper-jute
+ch.qos.reload4j:reload4j
+com.carrotsearch:hppc
+com.clearspring.analytics:stream
+com.fasterxml.jackson.core:jackson-annotations
+com.fasterxml.jackson.core:jackson-core
+com.fasterxml.jackson.core:jackson-databind
+com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
+com.fasterxml.jackson.datatype:jackson-datatype-jsr310
+com.fasterxml.jackson.module:jackson-module-scala_2.12
+com.fasterxml.woodstox:woodstox-core
+com.github.ben-manes.caffeine:caffeine
+com.github.davidmoten:guava-mini
+com.github.davidmoten:hilbert-curve
+com.github.joshelser:dropwizard-metrics-hadoop-metrics2-reporter
+com.github.stephenc.jcip:jcip-annotations
+com.google.code.findbugs:jsr305
+com.google.code.gson:gson
+com.google.crypto.tink:tink
+com.google.errorprone:error_prone_annotations
+com.google.flatbuffers:flatbuffers-java
+com.google.guava:failureaccess
+com.google.guava:guava
+com.google.guava:listenablefuture
+com.google.j2objc:j2objc-annotations
+com.jolbox:bonecp
+com.nimbusds:nimbus-jose-jwt
+com.ning:compress-lzf
+com.squareup.okhttp3:logging-interceptor
+com.squareup.okhttp3:okhttp
+com.squareup.okio:okio
+com.tdunning:json
+com.twitter:chill-java
+com.twitter:chill_2.12
+com.univocity:univocity-parsers
+com.vlkan:flatbuffers
+com.zaxxer:HikariCP
+commons-beanutils:commons-beanutils
+commons-cli:commons-cli
+commons-codec:commons-codec
+commons-collections:commons-collections
+commons-dbcp:commons-dbcp
+commons-io:commons-io
+commons-lang:commons-lang
+commons-logging:commons-logging
+commons-net:commons-net
+commons-pool:commons-pool
+io.airlift:aircompressor
+io.dropwizard.metrics:metrics-core
+io.dropwizard.metrics:metrics-graphite
+io.dropwizard.metrics:metrics-jmx
+io.dropwizard.metrics:metrics-json
+io.dropwizard.metrics:metrics-jvm
+io.fabric8:kubernetes-*
+io.fabric8:zjsonpatch
+io.javalin:javalin
+io.netty:netty-*
+jakarta.validation:jakarta.validation-api
+javax.jdo:jdo-api
+joda-time:joda-time
+net.bytebuddy:byte-buddy
+net.bytebuddy:byte-buddy-agent
+net.sf.jpam
+net.sf.opencsv:opencsv
+org.apiguardian:apiguardian-api
+org.datanucleus:datanucleus-core
+org.eclipse.jetty:jetty-*
+org.glassfish.jersey.containers:jersey-*
+org.json4s:json4s-*
+software.amazon.eventstream:eventstream
+software.amazon.awssdk:annotations
+software.amazon.awssdk:apache-client
+software.amazon.awssdk:arns
+software.amazon.awssdk:auth
+software.amazon.awssdk:aws-core
+software.amazon.awssdk:aws-json-protocol
+software.amazon.awssdk:aws-query-protocol
+software.amazon.awssdk:aws-xml-protocol
+software.amazon.awssdk:checksums
+software.amazon.awssdk:checksums-spi
+software.amazon.awssdk:crt-core
+software.amazon.awssdk:dynamodb
+software.amazon.awssdk:endpoints-spi
+software.amazon.awssdk:glue
+software.amazon.awssdk:http-auth
+software.amazon.awssdk:http-auth-aws
+software.amazon.awssdk:http-auth-spi
+software.amazon.awssdk:http-client-spi
+software.amazon.awssdk:identity-spi
+software.amazon.awssdk:json-utils
+software.amazon.awssdk:kms
+software.amazon.awssdk:metrics-spi
+software.amazon.awssdk:netty-nio-client
+software.amazon.awssdk:profiles
+software.amazon.awssdk:protocol-core
+software.amazon.awssdk:regions
+software.amazon.awssdk:s3
+software.amazon.awssdk:sdk-core
+software.amazon.awssdk:sts
+software.amazon.awssdk:third-party-jackson-core
+software.amazon.awssdk:url-connection-client
+software.amazon.awssdk:utils
+org.yaml:snakeyaml
+org.xerial.snappy:snappy-java
+org.wildfly.openssl:wildfly-openssl
+org.wildfly.common:wildfly-common
+org.wildfly.client:wildfly-client-config
+org.scala-lang:scala-*
+org.rocksdb:rocksdbjni
+org.roaringbitmap:RoaringBitmap
+org.opentest4j:opentest4j
+org.objenesis:objenesis
+org.mybatis:mybatis
+org.lz4:lz4-java
+org.jetbrains.kotlin:kotlin-*
+
+The BSD License
+--------------
+com.thoughtworks.paranamer:paranamer
+javolution:javolution
+org.antlr:antlr-runtime
+org.antlr:antlr4
+org.antlr:antlr4-runtime
+org.codehaus.janino:commons-compile
+org.codehaus.janino:janino
+org.codehaus.woodstox:stax2-api
+org.javassist:javassist
+org.jboss.logging:jboss-logging
+org.jboss.threads:jboss-threads
+org.jboss.xnio:xnio-api
+org.jetbrains:annotations
+org.jline:jline
+org.snakeyaml:snakeyaml-engine
+org.postgresql:postgresql
+
+BSD 2-Clause License
+--------------------
+com.github.luben:zstd-jni
+jline:jline:2.12
+
+BSD 3-Clause License
+--------------------
+com.esotericsoftware:kryo
+com.esotericsoftware:kryo-shaded
+com.google.protobuf:protobuf-java
+org.abego.treelayout:org.abego.treelayout.core
+org.fusesource.leveldbjni:leveldbjni-all
+org.threeten:threeten-extra
+
+New BSD License
+---------------
+com.esotericsoftware:minlog
+com.esotericsoftware:reflectasm
+com.esotericsoftware.minlog:minlog
+net.sf.py4j
+org.hamcrest:hamcrest-core
+
+Revised BSD License
+-------------------
+com.jcraft:jsch
+
+Modified BSD License
+--------------------
+sqlline:sqlline
+
+Eclipse Public License (EPL) 2.0
+--------------------------------
+jakarta.annotation:jakarta.annotation-api
+jakarta.servlet:jakarta.servlet-api
+jakarta.ws.rs:jakarta.ws.rs-api
+org.glassfish.hk2:hk2-*
+org.glassfish.hk2:osgi-resource-locator
+org.glassfish.hk2.external:aopalliance-repackaged
+org.glassfish.hk2.external:jakarta.inject
+
+MIT License
+-----------
+args4j:args4j
+org.slf4j:slf4j-api
+net.razorvine:pickle
+org.checkerframework:checker-qual
+org.codehaus.mojo:animal-sniffer-annotations
+
+The Go license
+--------------
+com.google.re2j
\ No newline at end of file
diff --git a/NOTICE-binary b/NOTICE-binary
new file mode 100644
index 000000000..c6c39c457
--- /dev/null
+++ b/NOTICE-binary
@@ -0,0 +1,79 @@
+// ------------------------------------------------------------------
+// NOTICE file corresponding to the section 4d of The Apache License,
+// Version 2.0, in this case for Apache Amoro
+// ------------------------------------------------------------------
+
+Apache Amoro (incubating)
+Copyright 2024 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Apache Iceberg
+Copyright 2017-2024 The Apache Software Foundation
+
+Apache Paimon
+Copyright 2023-2024 The Apache Software Foundation
+
+Apache Flink
+Copyright 2014-2024 The Apache Software Foundation
+
+Apache Spark
+Copyright 2014-2024 The Apache Software Foundation
+
+Apache Hive
+Copyright 2008-2024 The Apache Software Foundation
+
+Apache Hadoop
+Copyright 2006-2024 The Apache Software Foundation
+
+Apache Thrift
+Copyright (C) 2006 - 2024, The Apache Software Foundation
+
+Apache HttpClient
+Copyright 1999-2024 The Apache Software Foundation
+
+Apache HttpComponents Core HTTP/2
+Copyright 2005-2024 The Apache Software Foundation
+
+Apache HttpComponents Core HTTP/1.1
+Copyright 2005-2024 The Apache Software Foundation
+
+Apache Commons Lang
+Copyright 2001-2024 The Apache Software Foundation
+
+Apache Arrow
+Copyright 2022-2024 The Apache Software Foundation
+
+Apache Yetus - Audience Annotations
+Copyright 2015-2024 The Apache Software Foundation
+
+Apache Avro
+Copyright 2009-2024 The Apache Software Foundation
+
+Curator Framework
+Copyright 2011-2024 The Apache Software Foundation
+
+Curator Recipes
+Copyright 2011-2024 The Apache Software Foundation
+
+Curator Client
+Copyright 2011-2024 The Apache Software Foundation
+
+Apache Derby
+Copyright 2004-2024 The Apache Software Foundation
+
+Apache Hive
+Copyright 2018-2024 The Apache Software Foundation
+
+Apache HttpClient
+Copyright 1999-2024 The Apache Software Foundation
+
+Apache Ivy (TM)
+Copyright 2007-2024 The Apache Software Foundation
+
+Objenesis
+Copyright 2006-2024 Joe Walnes, Henri Tremblay, Leonardo Mesquita
+
+ORC Shims
+Copyright 2013-2024 The Apache Software Foundation
\ No newline at end of file
diff --git a/amoro-ams/dist/src/main/assemblies/bin.xml 
b/amoro-ams/dist/src/main/assemblies/bin.xml
index 5a49d03b1..409d190ec 100644
--- a/amoro-ams/dist/src/main/assemblies/bin.xml
+++ b/amoro-ams/dist/src/main/assemblies/bin.xml
@@ -64,13 +64,15 @@
             <fileMode>0644</fileMode>
         </file>
         <file>
-            <source>../../LICENSE</source>
+            <source>../../LICENSE-binary</source>
             <outputDirectory/>
+            <destName>LICENSE</destName>
             <fileMode>0644</fileMode>
         </file>
         <file>
-            <source>../../NOTICE</source>
+            <source>../../NOTICE-binary</source>
             <outputDirectory/>
+            <destName>NOTICE</destName>
             <fileMode>0644</fileMode>
         </file>
         <file>
@@ -80,6 +82,11 @@
         </file>
     </files>
     <fileSets>
+        <fileSet>
+            <directory>../../licenses-binary</directory>
+            <outputDirectory>licenses</outputDirectory>
+            <fileMode>0644</fileMode>
+        </fileSet>
         <fileSet>
             <directory>src/main/amoro-bin/bin</directory>
             <outputDirectory>bin</outputDirectory>
diff --git 
a/amoro-mixed-format/amoro-mixed-format-spark/amoro-mixed-format-spark-3-common/pom.xml
 
b/amoro-mixed-format/amoro-mixed-format-spark/amoro-mixed-format-spark-3-common/pom.xml
index 4903f8535..650c08fdb 100644
--- 
a/amoro-mixed-format/amoro-mixed-format-spark/amoro-mixed-format-spark-3-common/pom.xml
+++ 
b/amoro-mixed-format/amoro-mixed-format-spark/amoro-mixed-format-spark-3-common/pom.xml
@@ -161,10 +161,12 @@
         <dependency>
             <groupId>org.junit.platform</groupId>
             <artifactId>junit-platform-launcher</artifactId>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.junit.platform</groupId>
             <artifactId>junit-platform-suite-engine</artifactId>
+            <scope>test</scope>
         </dependency>
 
         <!-- iceberg -->
diff --git 
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/pom.xml
 
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/pom.xml
index 6555887d7..f0c401902 100644
--- 
a/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/pom.xml
+++ 
b/amoro-mixed-format/amoro-mixed-format-spark/v3.2/amoro-mixed-format-spark-3.2/pom.xml
@@ -282,10 +282,12 @@
         <dependency>
             <groupId>org.junit.platform</groupId>
             <artifactId>junit-platform-launcher</artifactId>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.junit.platform</groupId>
             <artifactId>junit-platform-suite-engine</artifactId>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
diff --git a/licenses-binary/LICENSE.asm b/licenses-binary/LICENSE.asm
new file mode 100644
index 000000000..62ffbccb6
--- /dev/null
+++ b/licenses-binary/LICENSE.asm
@@ -0,0 +1,31 @@
+ASM: a very small and fast Java bytecode manipulation framework
+
+Copyright (c) 2000-2011 INRIA, France Telecom
+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.
\ No newline at end of file
diff --git a/licenses-binary/LICENSE.base64 b/licenses-binary/LICENSE.base64
new file mode 100644
index 000000000..31ebc8405
--- /dev/null
+++ b/licenses-binary/LICENSE.base64
@@ -0,0 +1,26 @@
+The person or persons who have associated work with this document (the
+"Dedicator" or "Certifier") hereby either (a) certifies that, to the best of
+his knowledge, the work of authorship identified is in the public domain of
+the country from which the work is published, or (b) hereby dedicates whatever
+copyright the dedicators holds in the work of authorship identified below (the
+"Work") to the public domain. A certifier, moreover, dedicates any copyright
+interest he may have in the associated work, and for these purposes, is
+described as a "dedicator" below.
+
+A certifier has taken reasonable steps to verify the copyright status of this
+work. Certifier recognizes that his good faith efforts may not shield him from
+liability if in fact the work certified is not in the public domain.
+
+Dedicator makes this dedication for the benefit of the public at large and to
+the detriment of the Dedicator's heirs and successors. Dedicator intends this
+dedication to be an overt act of relinquishment in perpetuate of all present
+and future rights under copyright law, whether vested or contingent, in the
+Work. Dedicator understands that such relinquishment of all rights includes
+the relinquishment of all rights to enforce (by lawsuit or otherwise) those
+copyrights in the Work.
+
+Dedicator recognizes that, once placed in the public domain, the Work may be
+freely reproduced, distributed, transmitted, used, modified, built upon, or
+otherwise exploited by anyone for any purpose, commercial or non-commercial,
+and in any way, including by methods that have not yet been invented or
+conceived.
diff --git a/licenses-binary/LICENSE.checker-framework-qualifiers 
b/licenses-binary/LICENSE.checker-framework-qualifiers
new file mode 100644
index 000000000..7b59b5c98
--- /dev/null
+++ b/licenses-binary/LICENSE.checker-framework-qualifiers
@@ -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.
\ No newline at end of file
diff --git a/licenses-binary/LICENSE.dnsjava b/licenses-binary/LICENSE.dnsjava
new file mode 100644
index 000000000..8daf3fc25
--- /dev/null
+++ b/licenses-binary/LICENSE.dnsjava
@@ -0,0 +1,30 @@
+Copyright (c) 1998-2019, Brian Wellington
+Copyright (c) 2005 VeriSign. All rights reserved.
+Copyright (c) 2019-2021, dnsjava authors
+
+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 holder 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 HOLDER 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.
\ No newline at end of file
diff --git a/licenses-binary/LICENSE.janino b/licenses-binary/LICENSE.janino
new file mode 100644
index 000000000..ef871e242
--- /dev/null
+++ b/licenses-binary/LICENSE.janino
@@ -0,0 +1,31 @@
+Janino - An embedded Java[TM] compiler
+
+Copyright (c) 2001-2016, Arno Unkrig
+Copyright (c) 2015-2016  TIBCO Software 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 JANINO 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 HOLDERS 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.jaxb b/licenses-binary/LICENSE.jaxb
new file mode 100644
index 000000000..fd16ea954
--- /dev/null
+++ b/licenses-binary/LICENSE.jaxb
@@ -0,0 +1,135 @@
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)Version 1.1
+
+1. Definitions.
+
+     1.1. "Contributor" means each individual or entity that creates or 
contributes to the creation of Modifications.
+
+     1.2. "Contributor Version" means the combination of the Original 
Software, prior Modifications used by a Contributor (if any), and the 
Modifications made by that particular Contributor.
+
+     1.3. "Covered Software" means (a) the Original Software, or (b) 
Modifications, or (c) the combination of files containing Original Software 
with files containing Modifications, in each case including portions thereof.
+
+     1.4. "Executable" means the Covered Software in any form other than 
Source Code.
+
+     1.5. "Initial Developer" means the individual or entity that first makes 
Original Software available under this License.
+
+     1.6. "Larger Work" means a work which combines Covered Software or 
portions thereof with code not governed by the terms of this License.
+
+     1.7. "License" means this document.
+
+     1.8. "Licensable" means having the right to grant, to the maximum extent 
possible, whether at the time of the initial grant or subsequently acquired, 
any and all of the rights conveyed herein.
+
+     1.9. "Modifications" means the Source Code and Executable form of any of 
the following:
+
+     A. Any file that results from an addition to, deletion from or 
modification of the contents of a file containing Original Software or previous 
Modifications;
+
+     B. Any new file that contains any part of the Original Software or 
previous Modification; or
+
+     C. Any new file that is contributed or otherwise made available under the 
terms of this License.
+
+     1.10. "Original Software" means the Source Code and Executable form of 
computer software code that is originally released under this License.
+
+     1.11. "Patent Claims" means any patent claim(s), now owned or hereafter 
acquired, including without limitation, method, process, and apparatus claims, 
in any patent Licensable by grantor.
+
+     1.12. "Source Code" means (a) the common form of computer software code 
in which modifications are made and (b) associated documentation included in or 
with such code.
+
+     1.13. "You" (or "Your") means an individual or a legal entity exercising 
rights under, and complying with all of the terms of, this License. For legal 
entities, "You" includes any entity which controls, is controlled by, or is 
under common control with You. For purposes of this definition, "control" means 
(a) the power, direct or indirect, to cause the direction or management of such 
entity, whether by contract or otherwise, or (b) ownership of more than fifty 
percent (50%) of the o [...]
+
+2. License Grants.
+
+     2.1. The Initial Developer Grant.
+
+     Conditioned upon Your compliance with Section 3.1 below and subject to 
third party intellectual property claims, the Initial Developer hereby grants 
You a world-wide, royalty-free, non-exclusive license:
+
+     (a) under intellectual property rights (other than patent or trademark) 
Licensable by Initial Developer, to use, reproduce, modify, display, perform, 
sublicense and distribute the Original Software (or portions thereof), with or 
without Modifications, and/or as part of a Larger Work; and
+
+     (b) under Patent Claims infringed by the making, using or selling of 
Original Software, to make, have made, use, practice, sell, and offer for sale, 
and/or otherwise dispose of the Original Software (or portions thereof).
+
+     (c) The licenses granted in Sections 2.1(a) and (b) are effective on the 
date Initial Developer first distributes or otherwise makes the Original 
Software available to a third party under the terms of this License.
+
+     (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 
(1) for code that You delete from the Original Software, or (2) for 
infringements caused by: (i) the modification of the Original Software, or (ii) 
the combination of the Original Software with other software or devices.
+
+     2.2. Contributor Grant.
+
+     Conditioned upon Your compliance with Section 3.1 below and subject to 
third party intellectual property claims, each Contributor hereby grants You a 
world-wide, royalty-free, non-exclusive license:
+
+     (a) under intellectual property rights (other than patent or trademark) 
Licensable by Contributor to use, reproduce, modify, display, perform, 
sublicense and distribute the Modifications created by such Contributor (or 
portions thereof), either on an unmodified basis, with other Modifications, as 
Covered Software and/or as part of a Larger Work; and
+
+     (b) under Patent Claims infringed by the making, using, or selling of 
Modifications made by that Contributor either alone and/or in combination with 
its Contributor Version (or portions of such combination), to make, use, sell, 
offer for sale, have made, and/or otherwise dispose of: (1) Modifications made 
by that Contributor (or portions thereof); and (2) the combination of 
Modifications made by that Contributor with its Contributor Version (or 
portions of such combination).
+
+     (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on 
the date Contributor first distributes or otherwise makes the Modifications 
available to a third party.
+
+     (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 
(1) for any code that Contributor has deleted from the Contributor Version; (2) 
for infringements caused by: (i) third party modifications of Contributor 
Version, or (ii) the combination of Modifications made by that Contributor with 
other software (except as part of the Contributor Version) or other devices; or 
(3) under Patent Claims infringed by Covered Software in the absence of 
Modifications made by that Co [...]
+
+3. Distribution Obligations.
+
+     3.1. Availability of Source Code.
+
+     Any Covered Software that You distribute or otherwise make available in 
Executable form must also be made available in Source Code form and that Source 
Code form must be distributed only under the terms of this License. You must 
include a copy of this License with every copy of the Source Code form of the 
Covered Software You distribute or otherwise make available. You must inform 
recipients of any such Covered Software in Executable form as to how they can 
obtain such Covered Softw [...]
+
+     3.2. Modifications.
+
+     The Modifications that You create or to which You contribute are governed 
by the terms of this License. You represent that You believe Your Modifications 
are Your original creation(s) and/or You have sufficient rights to grant the 
rights conveyed by this License.
+
+     3.3. Required Notices.
+
+     You must include a notice in each of Your Modifications that identifies 
You as the Contributor of the Modification. You may not remove or alter any 
copyright, patent or trademark notices contained within the Covered Software, 
or any notices of licensing or any descriptive text giving attribution to any 
Contributor or the Initial Developer.
+
+     3.4. Application of Additional Terms.
+
+     You may not offer or impose any terms on any Covered Software in Source 
Code form that alters or restricts the applicable version of this License or 
the recipients' rights hereunder. You may choose to offer, and to charge a fee 
for, warranty, support, indemnity or liability obligations to one or more 
recipients of Covered Software. However, you may do so only on Your own behalf, 
and not on behalf of the Initial Developer or any Contributor. You must make it 
absolutely clear that any [...]
+
+     3.5. Distribution of Executable Versions.
+
+     You may distribute the Executable form of the Covered Software under the 
terms of this License or under the terms of a license of Your choice, which may 
contain terms different from this License, provided that You are in compliance 
with the terms of this License and that the license for the Executable form 
does not attempt to limit or alter the recipient's rights in the Source Code 
form from the rights set forth in this License. If You distribute the Covered 
Software in Executable f [...]
+
+     3.6. Larger Works.
+
+     You may create a Larger Work by combining Covered Software with other 
code not governed by the terms of this License and distribute the Larger Work 
as a single product. In such a case, You must make sure the requirements of 
this License are fulfilled for the Covered Software.
+
+4. Versions of the License.
+
+     4.1. New Versions.
+
+     Oracle is the initial license steward and may publish revised and/or new 
versions of this License from time to time. Each version will be given a 
distinguishing version number. Except as provided in Section 4.3, no one other 
than the license steward has the right to modify this License.
+
+     4.2. Effect of New Versions.
+
+     You may always continue to use, distribute or otherwise make the Covered 
Software available under the terms of the version of the License under which 
You originally received the Covered Software. If the Initial Developer includes 
a notice in the Original Software prohibiting it from being distributed or 
otherwise made available under any subsequent version of the License, You must 
distribute and make the Covered Software available under the terms of the 
version of the License under  [...]
+
+     4.3. Modified Versions.
+
+     When You are an Initial Developer and You want to create a new license 
for Your Original Software, You may create and use a modified version of this 
License if You: (a) rename the license and remove any references to the name of 
the license steward (except to note that the license differs from this 
License); and (b) otherwise make it clear that the license contains terms which 
differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+     COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, 
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT 
LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, 
MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK 
AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD 
ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL 
DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUM [...]
+
+6. TERMINATION.
+
+     6.1. This License and the rights granted hereunder will terminate 
automatically if You fail to comply with terms herein and fail to cure such 
breach within 30 days of becoming aware of the breach. Provisions which, by 
their nature, must remain in effect beyond the termination of this License 
shall survive.
+
+     6.2. If You assert a patent infringement claim (excluding declaratory 
judgment actions) against Initial Developer or a Contributor (the Initial 
Developer or Contributor against whom You assert such claim is referred to as 
"Participant") alleging that the Participant Software (meaning the Contributor 
Version where the Participant is a Contributor or the Original Software where 
the Participant is the Initial Developer) directly or indirectly infringes any 
patent, then any and all righ [...]
+
+     6.3. If You assert a patent infringement claim against Participant 
alleging that the Participant Software directly or indirectly infringes any 
patent where such claim is resolved (such as by license or settlement) prior to 
the initiation of patent infringement litigation, then the reasonable value of 
the licenses granted by such Participant under Sections 2.1 or 2.2 shall be 
taken into account in determining the amount or value of any payment or license.
+
+     6.4. In the event of termination under Sections 6.1 or 6.2 above, all end 
user licenses that have been validly granted by You or any distributor 
hereunder prior to termination (excluding licenses granted to You by any 
distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING 
NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY 
OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF 
ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, 
INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT 
LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR 
MALFUNCTION, OR ANY AND ALL OTHER COMM [...]
+
+8. U.S. GOVERNMENT END USERS.
+
+     The Covered Software is a "commercial item," as that term is defined in 
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" (as 
that term is defined at 48 C.F.R. ? 252.227-7014(a)(1)) and "commercial 
computer software documentation" as such terms are used in 48 C.F.R. 12.212 
(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 
227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software 
with only those rights set for [...]
+
+9. MISCELLANEOUS.
+
+     This License represents the complete agreement concerning subject matter 
hereof. If any provision of this License is held to be unenforceable, such 
provision shall be reformed only to the extent necessary to make it 
enforceable. This License shall be governed by the law of the jurisdiction 
specified in a notice contained within the Original Software (except to the 
extent applicable law, if any, provides otherwise), excluding such 
jurisdiction's conflict-of-law provisions. Any litiga [...]
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+     As between Initial Developer and the Contributors, each party is 
responsible for claims and damages arising, directly or indirectly, out of its 
utilization of rights under this License and You agree to work with Initial 
Developer and Contributors to distribute such responsibility on an equitable 
basis. Nothing herein is intended or shall be deemed to constitute any 
admission of liability.
+
+----------
+NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION 
LICENSE (CDDL)
+The code released under the CDDL shall be governed by the laws of the State of 
California (excluding conflict-of-law provisions). Any litigation relating to 
this License shall be subject to the jurisdiction of the Federal Courts of the 
Northern District of California and the state courts of the State of 
California, with venue lying in Santa Clara County, California.
diff --git a/licenses-binary/LICENSE.jsr166y b/licenses-binary/LICENSE.jsr166y
new file mode 100644
index 000000000..b1c292b54
--- /dev/null
+++ b/licenses-binary/LICENSE.jsr166y
@@ -0,0 +1,26 @@
+The person or persons who have associated work with this document (the
+"Dedicator" or "Certifier") hereby either (a) certifies that, to the best of
+his knowledge, the work of authorship identified is in the public domain of
+the country from which the work is published, or (b) hereby dedicates whatever
+copyright the dedicators holds in the work of authorship identified below (the
+"Work") to the public domain. A certifier, moreover, dedicates any copyright
+interest he may have in the associated work, and for these purposes, is
+described as a "dedicator" below.
+
+A certifier has taken reasonable steps to verify the copyright status of this
+work. Certifier recognizes that his good faith efforts may not shield him from
+liability if in fact the work certified is not in the public domain.
+
+Dedicator makes this dedication for the benefit of the public at large and to
+the detriment of the Dedicator's heirs and successors. Dedicator intends this
+dedication to be an overt act of relinquishment in perpetuity of all present
+and future rights under copyright law, whether vested or contingent, in the
+Work. Dedicator understands that such relinquishment of all rights includes
+the relinquishment of all rights to enforce (by lawsuit or otherwise) those
+copyrights in the Work.
+
+Dedicator recognizes that, once placed in the public domain, the Work may be
+freely reproduced, distributed, transmitted, used, modified, built upon, or
+otherwise exploited by anyone for any purpose, commercial or non-commercial,
+and in any way, including by methods that have not yet been invented or
+conceived.
diff --git a/licenses-binary/LICENSE.jzlib b/licenses-binary/LICENSE.jzlib
new file mode 100644
index 000000000..29ad562af
--- /dev/null
+++ b/licenses-binary/LICENSE.jzlib
@@ -0,0 +1,26 @@
+Copyright (c) 2000,2001,2002,2003,2004 ymnk, JCraft,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. The names of the authors may not be used to endorse or promote products
+     derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 JCRAFT,
+INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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.webbit b/licenses-binary/LICENSE.webbit
new file mode 100644
index 000000000..ec5f34899
--- /dev/null
+++ b/licenses-binary/LICENSE.webbit
@@ -0,0 +1,38 @@
+(BSD License: http://www.opensource.org/licenses/bsd-license)
+
+Copyright (c) 2011, Joe Walnes, Aslak Hellesøy and contributors
+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 Webbit 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 HOLDER 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/pom.xml b/pom.xml
index 39b5449df..db72154d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -153,36 +153,43 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
             <groupId>org.junit.jupiter</groupId>
             <artifactId>junit-jupiter</artifactId>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
             <groupId>org.junit.jupiter</groupId>
             <artifactId>junit-jupiter-api</artifactId>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
             <groupId>org.junit.vintage</groupId>
             <artifactId>junit-vintage-engine</artifactId>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
             <groupId>org.junit.jupiter</groupId>
             <artifactId>junit-jupiter-engine</artifactId>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
         </dependency>
 
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-junit-jupiter</artifactId>
+            <scope>test</scope>
         </dependency>
 
         <!-- tests will have log4j as the default logging framework available 
-->
@@ -1042,10 +1049,12 @@
                             <exclude>**/*.log</exclude>
                             <exclude>tools/maven/scalafmt.conf</exclude>
                             <exclude>**/licenses/**</exclude>
+                            <exclude>**/licenses-binary/**</exclude>
                             <!-- Administrative files in the main trunk. -->
                             <exclude>**/README.md</exclude>
                             <exclude>**/CODE_OF_CONDUCT.md</exclude>
                             <exclude>.github/**</exclude>
+                            <exclude>**/NOTICE-binary*</exclude>
                             <!-- IDE files. -->
                             <exclude>**/*.iml</exclude>
                             <exclude>**/.idea/**</exclude>
diff --git a/tools/releasing/NOTICE-binary_PREAMBLE.txt 
b/tools/releasing/NOTICE-binary_PREAMBLE.txt
new file mode 100644
index 000000000..a06338299
--- /dev/null
+++ b/tools/releasing/NOTICE-binary_PREAMBLE.txt
@@ -0,0 +1,7 @@
+// ------------------------------------------------------------------
+// NOTICE file corresponding to the section 4d of The Apache License,
+// Version 2.0, in this case for Apache Amoro
+// ------------------------------------------------------------------
+
+Apache Amoro
+Copyright 2024 The Apache Software Foundation
\ No newline at end of file
diff --git a/tools/releasing/collect_license_files.sh 
b/tools/releasing/collect_license_files.sh
new file mode 100644
index 000000000..ae2761ec2
--- /dev/null
+++ b/tools/releasing/collect_license_files.sh
@@ -0,0 +1,65 @@
+#!/usr/bin/env bash
+################################################################################
+#  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.
+################################################################################
+
+# This script extracts from all jars in the specified directory the NOTICE 
files and the
+# licenses folders. It then concatenates all NOTICE files and collects the 
contents of all
+# licenses folders in the specified output directory.
+#
+# This tool can be used to generate a rough skeleton for the binary NOTICE 
file. Be aware,
+# that it does not deduplicate contents.
+
+set -Eeuo pipefail
+
+SRC=${1:-.}
+DST=${2:-licenses-output}
+PWD=$(pwd)
+TMP="${DST}/tmp"
+DIR=$(dirname "$0")
+NOTICE_BINARY_PREAMBLE="${DIR}/NOTICE-binary_PREAMBLE.txt"
+
+USAGE="collect_license_files <SOURCE_DIRECTORY:-.> 
<OUTPUT_DIRECTORY:-licenses-output>"
+
+if [ "${SRC}" = "-h" ]; then
+       echo "${USAGE}"
+       exit 0
+fi
+
+for i in $(find -L "${SRC}" -name "*.jar")
+do
+       DIR="${TMP}/$(basename -- "$i" .jar)"
+       mkdir -p "${DIR}"
+       JAR="${PWD}/${i}"
+       (cd "${DIR}" && jar xf ${JAR} META-INF/NOTICE META-INF/licenses)
+done
+
+NOTICE="${DST}/NOTICE"
+[ -f "${NOTICE}" ] && rm "${NOTICE}"
+cp "${NOTICE_BINARY_PREAMBLE}" "${NOTICE}"
+(export LC_ALL=C; find "${TMP}" -name "NOTICE" | sort | xargs cat >> 
"${NOTICE}")
+
+LICENSES="${DST}/licenses"
+[ -f "${LICENSES}" ] && rm -r "${LICENSES}"
+find "${TMP}" -name "licenses" -type d -exec cp -r -- "{}" "${DST}" \;
+
+# Search the binary distribution directory and collect those license files that
+# not bundled in any jars.
+find "${SRC}" -name "LICENSE.*" -type f \
+! -path "${DST}/licenses/*" ! -path "${TMP}/licenses/*" -exec cp -- "{}" 
"${DST}/licenses" \;
+
+rm -r "${TMP}"
\ No newline at end of file


Reply via email to