wombatu-kun commented on code in PR #16543:
URL: https://github.com/apache/iceberg/pull/16543#discussion_r3670850203


##########
aws-bundle/build.gradle:
##########
@@ -60,6 +60,10 @@ project(":iceberg-aws-bundle") {
       include 'NOTICE'
     }
 
+    // exclude dependency-provided LICENSE/NOTICE files in favor of the 
bundled Iceberg ones
+    exclude 'META-INF/LICENSE*'
+    exclude 'META-INF/NOTICE*'

Review Comment:
   Done af6d91fb8, though not with the pattern form. Task-level `exclude` is 
inherited by the `from(projectDir)` child spec above it, so `exclude 'LICENSE'` 
drops the bundle's aggregated pair as well; I built it that way first and the 
jar came out with no LICENSE and no NOTICE at all. Shadow filters 
dependency-jar entries through that same root pattern set and it is the only 
hook that reaches them, since `eachFile` and `duplicatesStrategy` never see 
archive contents, so the fix uses the `Spec` form instead: entries read out of 
a dependency jar have no backing `File`, entries copied from the project 
directory do.
   
   Deduping alone would have cost attributions, though. `flink-runtime/LICENSE` 
listed only "code from Apache Commons" while the jar ships `util/Tasks` 
(Presto), `RoaringPositionBitmap` (Delta Lake), `DynMethods` (Parquet), 
`avro/ValueWriters` (Avro) and the Kite visitors, all covered only by the 
repo-root copy that was riding along, so the same commit back-fills those 
entries into the six runtime LICENSE/NOTICE files. azure/gcp get the exclude 
too so every shaded module states the invariant the same way, and 
`iceberg-bundled-guava` is included, which closes out #17406.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to