Skip to content
Open
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
4 changes: 2 additions & 2 deletions java-bigquery/google-cloud-bigquery-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/io.netty.versions.properties</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
</transformers>
<relocations>
<relocation>
Expand All @@ -137,8 +139,6 @@
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/LICENSE*</exclude>
<exclude>META-INF/NOTICE*</exclude>
Comment on lines 140 to -141
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Removing these wildcard excludes for LICENSE* and NOTICE* can lead to license information being lost. Files matching these wildcards but not named LICENSE or NOTICE (e.g., META-INF/LICENSE.md, META-INF/LICENSE-MIT.txt) will now be included in the uber JAR.

If multiple dependencies provide a file with the same path, one will overwrite the other, which can create license compliance issues.

To prevent this, consider using AppendingTransformer for other known license file names to merge their content. For example:

<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  <resource>META-INF/LICENSE.md</resource>
</transformer>

This would require identifying all such non-standard license files in your dependencies and adding a transformer for each.

<exclude>META-INF/DEPENDENCIES</exclude>
<exclude>META-INF/proguard/*.pro</exclude>
<exclude>META-INF/maven/**</exclude>
Expand Down
Loading