Skip to content

chore(build): add customized LICENSE to jar META-INF and dist zips#4367

Merged
bobbai00 merged 12 commits into
apache:mainfrom
bobbai00:fixe/jar-license
Apr 17, 2026
Merged

chore(build): add customized LICENSE to jar META-INF and dist zips#4367
bobbai00 merged 12 commits into
apache:mainfrom
bobbai00:fixe/jar-license

Conversation

@bobbai00
Copy link
Copy Markdown
Contributor

@bobbai00 bobbai00 commented Apr 12, 2026

What changes were proposed in this PR?

This PR ensures that:

  • Each jar's LICENSE describes only what is in that jar
    • For workflow-operator jar: the LICENSE includes Apache 2.0 and 3rd party code mbknor-jackson-jsonschema MIT attribution and MIT license.
    • All other jars: the LICENSE is Apache 2.0 only
  • the zips produced by sbt dist include LICENSE/NOTICE/DISCLAIMER at the top level

Any related issues, documentation, discussions?

Closes #4394

How was this PR tested?

  • Built dist zips and inspected jar META-INF/LICENSE content
  • Verified all Texera module jars are thin jars (no dependency classes merged in)
  • Confirmed workflow-operator is the only jar with non-Apache classes (com/kjetland)

Was this PR authored or co-authored using generative AI tooling?

Co-authored using: Claude Code (Claude Opus 4.6)

bobbai00 and others added 2 commits April 12, 2026 08:56
Modeled after Apache Pekko's AddMetaInfLicenseFiles pattern:
- Add legal/ with hand-curated StandardLicense.txt and TexeraNotice.txt
- Add project/AddMetaInfLicenseFiles.scala to copy them into META-INF
- Wire asfDistLicensingSettings into all 6 dist-producing modules
  so LICENSE/NOTICE/DISCLAIMER-WIP appear at dist zip top level

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file fix labels Apr 12, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chenlica
Copy link
Copy Markdown
Contributor

@bobbai00 Please suggest a committer to review this PR.

The dist zip now includes LICENSE/NOTICE/DISCLAIMER-WIP at its top
level via asfDistLicensingSettings, so the manual COPY workaround
in Dockerfiles is no longer needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the dev label Apr 12, 2026
@bobbai00 bobbai00 changed the title feat: add ASF license/notice files to jar META-INF and dist zips chore: add ASF license, disclaimer and notice files to dist zips Apr 12, 2026
@bobbai00 bobbai00 removed the fix label Apr 12, 2026
@github-actions github-actions Bot added the fix label Apr 12, 2026
@bobbai00 bobbai00 requested a review from aglinxinyuan April 12, 2026 21:31
@bobbai00
Copy link
Copy Markdown
Contributor Author

@bobbai00 Please suggest a committer to review this PR.

Can @aglinxinyuan review it?

@bobbai00 bobbai00 self-assigned this Apr 12, 2026
…SCLAIMER

Each jar's META-INF/LICENSE now describes only what is in that specific
jar rather than copying the entire source release LICENSE:
- workflow-operator: Apache 2.0 + mbknor-jackson-jsonschema (MIT)
- all other modules: Apache 2.0 only

Rename DISCLAIMER-WIP to DISCLAIMER since the known licensing gap
(missing LICENSE/NOTICE in binary artifacts) is now resolved.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bobbai00 bobbai00 changed the title chore: add ASF license, disclaimer and notice files to dist zips chore: add ASF license files to jar META-INF and dist zips with per-module accuracy Apr 12, 2026
@aglinxinyuan aglinxinyuan requested a review from Copilot April 13, 2026 00:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements per-module ASF licensing compliance by generating tailored META-INF licensing files for JARs and ensuring distribution ZIPs include top-level LICENSE/NOTICE/DISCLAIMER, addressing #4131.

Changes:

  • Added an sbt build helper to generate per-module META-INF/LICENSE (Apache-only vs. workflow-operator + MIT attribution) and copy NOTICE/DISCLAIMER.
  • Updated build configuration to apply the new per-module licensing settings and add top-level licensing files to dist ZIPs.
  • Renamed/replaced DISCLAIMER-WIP usage with DISCLAIMER across Dockerfiles and tooling configuration.

Reviewed changes

Copilot reviewed 3 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
project/AddMetaInfLicenseFiles.scala New sbt helper that generates/copies licensing files for JAR META-INF and dist ZIPs.
DISCLAIMER Removes WIP compliance note now that the artifacts are being updated.
build.sbt Switches from generic copy to per-module licensing settings; applies dist ZIP licensing mappings to service modules.
bin/*.dockerfile Updates Docker builds to use DISCLAIMER (and removes redundant runtime-stage copying).
.licenserc.yaml Removes DISCLAIMER-WIP from license header configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread project/AddMetaInfLicenseFiles.scala
Comment thread project/AddMetaInfLicenseFiles.scala Outdated
Comment thread project/AddMetaInfLicenseFiles.scala Outdated
Copy link
Copy Markdown
Contributor

@aglinxinyuan aglinxinyuan left a comment

Choose a reason for hiding this comment

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

The PR looks good to me.

The DISCLAIMER now says we are fully compliant with the ASF policy. It's a very strong claim. I don't see any place that isn't following the ASF policy, but it's better to have a second eye on this before the next RC.

@chenlica
Copy link
Copy Markdown
Contributor

@bobbai00 please ask Ian Maxon to review it.

@bobbai00 bobbai00 changed the title chore: add ASF license files to jar META-INF and dist zips with per-module accuracy chore: add ASF license files to jar META-INF and dist zips Apr 13, 2026
- Replace magic number idx>=200 with search for THIRD-PARTY DEPENDENCIES header
- Remove duplicate DISCLAIMER entry in reserved set

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bobbai00 bobbai00 requested a review from parshimers April 13, 2026 05:08
bobbai00 and others added 4 commits April 13, 2026 13:16
Per apache#4372, the WIP disclaimer should stay until Docker image
LICENSE/NOTICE files properly describe their contents. Updated the
known-issues bullet to reflect that jar licensing is now fixed and
only Docker image licensing remains outstanding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bobbai00
Copy link
Copy Markdown
Contributor Author

The PR looks good to me.

The DISCLAIMER now says we are fully compliant with the ASF policy. It's a very strong claim. I don't see any place that isn't following the ASF policy, but it's better to have a second eye on this before the next RC.

After viewing some ASF documents, this PR does NOT make Texera fully compliant with ASF policy. So this PR will NOT change DISCLAIMER-WIP to DISCLAIMER

@bobbai00 bobbai00 changed the title chore: add ASF license files to jar META-INF and dist zips chore(LICENSE): add customized LICENSE to jar META-INF and dist zips Apr 17, 2026
@bobbai00 bobbai00 changed the title chore(LICENSE): add customized LICENSE to jar META-INF and dist zips chore(build): add customized LICENSE to jar META-INF and dist zips Apr 17, 2026
@bobbai00 bobbai00 enabled auto-merge (squash) April 17, 2026 20:53
@bobbai00 bobbai00 merged commit 4be9bae into apache:main Apr 17, 2026
11 checks passed
bobbai00 added a commit to bobbai00/texera that referenced this pull request Apr 18, 2026
…pache#4367)

### What changes were proposed in this PR?

This PR ensures that:
- Each jar's `LICENSE` describes only what is in that jar
- For `workflow-operator` jar: the LICENSE includes Apache 2.0 and 3rd
party code `mbknor-jackson-jsonschema` MIT attribution and MIT license.
  - All other jars: the LICENSE is Apache 2.0 only
- the zips produced by `sbt dist` include LICENSE/NOTICE/DISCLAIMER at
the top level



### Any related issues, documentation, discussions?

Closes apache#4394 

### How was this PR tested?

- Built dist zips and inspected jar META-INF/LICENSE content
- Verified all Texera module jars are thin jars (no dependency classes
merged in)
- Confirmed `workflow-operator` is the only jar with non-Apache classes
(`com/kjetland`)

### Was this PR authored or co-authored using generative AI tooling?

Co-authored using: Claude Code (Claude Opus 4.6)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Xinyuan Lin <xinyual3@uci.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file dev fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Per-jar META-INF/LICENSE should describe each jar's actual contents

4 participants