Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
</executions>
</plugin>

<plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
Expand All @@ -332,6 +332,38 @@
</execution>
</executions>
</plugin>

<!-- Extract the verbatim LICENSE/NOTICE files of the bundled lib/ jars into
target/bin-distr-licenses just before the assembly runs, so the binary
distribution ships them under licenses/. The set is derived from the
assembly descriptor itself (single source of truth - no over- or
under-disclosure), so these files are generated, never checked in.
Runs only on this aggregator (inherited=false). -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<inherited>false</inherited>
<executions>
<execution>
<id>emit-third-party-licenses</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/bin/java</executable>
<arguments>
<argument>-Dbasedir=${project.basedir}</argument>
<argument>-Dmaven.repo.local=${settings.localRepository}</argument>
<argument>${project.basedir}/src/main/bin_distr_license_notices/CheckLicenseNotices.java</argument>
<argument>--emit</argument>
<argument>${project.build.directory}/bin-distr-licenses</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>

<pluginManagement>
Expand All @@ -349,7 +381,10 @@
<!-- These markdown files cannot bear a license header -->
<inputExclude>NOTICE.md</inputExclude>
<inputExclude>CONTRIBUTING.md</inputExclude>
<inputExclude>src/main/bin_distr_license_notices/NOTICE.md</inputExclude>
<!-- The bundled distribution NOTICE cannot bear a license header -->
<inputExclude>src/main/bin_distr_license_notices/NOTICE.txt</inputExclude>
<!-- Generated state file for the license tool - no ASF header -->
<inputExclude>src/main/bin_distr_license_notices/verified-notice-deps.txt</inputExclude>
<!-- These configuration files cannot bear a license header -->
<inputExclude>.github/**/*</inputExclude>
<inputExclude>src/main/eclipse/org.eclipse.jdt.core.prefs</inputExclude>
Expand Down
14 changes: 13 additions & 1 deletion src/main/assembly/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,18 @@ under the License.
<directoryMode>755</directoryMode>
</fileSet>

<!-- Verbatim third-party LICENSE/NOTICE copies for the bundled lib/ jars.
Not checked in: extracted from the bundled JARs at prepare-package by
src/main/bin_distr_license_notices/CheckLicenseNotices.java (emit mode)
into the directory below (see the exec-maven-plugin execution in pom.xml).
The top-level LICENSE.txt points into this directory. -->
<fileSet>
<directory>${project.build.directory}/bin-distr-licenses</directory>
<outputDirectory>licenses</outputDirectory>
<fileMode>644</fileMode>
<directoryMode>755</directoryMode>
</fileSet>

<!-- copy standard top level files -->
<fileSet>
<directory>.</directory>
Expand Down Expand Up @@ -360,7 +372,7 @@ under the License.
<fileMode>644</fileMode>
</file>
<file>
<source>src/main/bin_distr_license_notices/NOTICE.md</source>
<source>src/main/bin_distr_license_notices/NOTICE.txt</source>
<outputDirectory></outputDirectory>
<fileMode>644</fileMode>
</file>
Expand Down
Loading
Loading