slachiewicz opened a new pull request, #991:
URL: https://github.com/apache/incubator-xtable/pull/991

   Addresses #701, and #865 by construction. A fresh version of #898 on current 
`main`, opened alongside #895 so the two license models can be compared on the 
same base.
   
   ## What is the purpose of the pull request
   
   ASF policy 
([licensing-howto](https://infra.apache.org/licensing-howto.html)) needs no 
LICENSE entry for a bundled Apache-2.0 dependency, and NOTICE must carry 
nothing that is not legally required. This renders both at build time instead 
of maintaining them:
   
   - `META-INF/LICENSE` is rendered per module by 
`maven-remote-resources-plugin` from 
`release/license/bundled/META-INF/LICENSE.vm`: the Apache License 2.0, then 
only the bundled non-Apache-2.0 components, each with a pointer to its text 
under `META-INF/licenses/`. `supplemental-models.xml` supplies a license for 
artifacts whose POM declares none.
   - `META-INF/NOTICE` is merged by the shade plugin's 
`ApacheNoticeResourceTransformer`.
   
   What it replaces on `main`, all maintained by hand or by script:
   
   | | `main` | this PR |
   | :--- | ---: | ---: |
   | `LICENSE-bundled` and `NOTICE-bundled`, four modules | 2,680 lines | 
rendered |
   | `generate_shaded_license_metadata.py` | 488 lines | removed |
   | `validate_shaded_license_coverage.sh` | 259 lines | removed |
   | `LICENSE.vm` and `supplemental-models.xml` | | 615 lines |
   
   Outside the license texts added for `xtable-utilities`, the diff is 
+540/-3,296. Those 20 texts (+6,835) are for a bundle that is not published or 
checked, and can come out of this PR if preferred.
   
   Rendered sizes, `main`'s maintained file against the jar's file on this 
branch:
   
   | Bundle | LICENSE | NOTICE |
   | :--- | :--- | :--- |
   | `xtable-aws` | 278 → 218 | 248 → 107 |
   | `xtable-hive-metastore` | 420 → 229 | 1,175 → 1,159 |
   | `xtable-hudi-support-extensions` | 229 → 216 | 87 → 18 |
   | `xtable-spark-runtime` | 221 → 214 | 22 → 18 |
   
   `xtable-hive-metastore`'s NOTICE stays large because the NOTICE files of the 
Hive artifacts it bundles are long.
   
   ## Brief change log
   
   - Render LICENSE and NOTICE for `xtable-aws`, `xtable-hive-metastore`, 
`xtable-hudi-support-extensions` and `xtable-spark-runtime`; delete their 
`LICENSE-bundled` and `NOTICE-bundled`.
   - Each shaded module lists its bundled artifact IDs in 
`xtable.bundled.artifactIds`, mirroring its shade includes.
   - Stop shading `junit:junit` and `hamcrest-core` into 
`xtable-hive-metastore`.
   - Remove the generator and the coverage script; 
`validate_bundled_license_texts.py` stays as the License Check's validator.
   - `AGENTS.md` describes the render instead of the generator.
   
   This and #990 are alternatives: #990 repairs the coverage script that this 
PR removes.
   
   ## Verify this pull request
   
   Verified: the License Check's build of the four shaded modules, then 
`validate_bundled_license_texts.py` → all four OK; `apache-rat:check` and 
`spotless:check` pass. Each bundle has exactly one `META-INF/LICENSE` and one 
`META-INF/NOTICE`, and no rendered LICENSE has an `UNMAPPED-LICENSE` line.
   
   `validate_bundled_license_texts.py` does not check that a jar has a 
`META-INF/LICENSE` at all: it reported `xtable-hudi-support-extensions` as OK 
while its transformer pointed at a missing file and the jar shipped none. That 
is worth a check of its own, in this PR or separately.
   


-- 
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]

Reply via email to