Skip to content

UID2-1750: fix Lombok scope and add MIT license attribution#610

Merged
sunnywu merged 2 commits into
mainfrom
syw-UID2-1750-lombok-license-compliance
Apr 7, 2026
Merged

UID2-1750: fix Lombok scope and add MIT license attribution#610
sunnywu merged 2 commits into
mainfrom
syw-UID2-1750-lombok-license-compliance

Conversation

@sunnywu
Copy link
Copy Markdown
Contributor

@sunnywu sunnywu commented Apr 1, 2026

Summary

  • Change Lombok from default compile scope to provided + optional so it no longer propagates as a transitive dependency to downstream services
  • Register Lombok as an explicit annotationProcessorPath in maven-compiler-plugin for Java 9+ module system compatibility
  • Add NOTICE file with Lombok copyright acknowledgment (compile-time only note)
  • Add THIRD-PARTY-LICENSES/lombok-LICENSE.txt with full MIT license text

Why

Lombok defaulting to compile scope caused it to leak transitively into all consumers of uid2-shared. This is architecturally wrong — Lombok is a build tool, not a runtime library — and means downstream JARs/Docker images bundle lombok.jar, triggering MIT attribution obligations in those projects. See UID2-1750.

Test plan

🤖 Generated with Claude Code

Comment thread pom.xml Outdated
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
<scope>provided</scope>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

curious, do we actually need provided given there is no runtime and optional is there?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

what claude said:

uid2-shared is a library (not a leaf project), so the relevant scoping concerns are different:

  • optional — correct and important here. It prevents downstream projects that depend on uid2-shared from inheriting lombok as a transitive
    dependency.
  • provided — Jon's question is fair. For a library JAR, Maven doesn't bundle dependencies regardless of scope (that's only for fat JARs). And since
    optional already stops transitive propagation, provided is technically redundant from a Maven behavior standpoint.

So for uid2-shared specifically: optional alone is sufficient to achieve the desired effect. provided doesn't add any functional difference — it's
redundant, though harmless.

sunnywu and others added 2 commits April 7, 2026 15:07
- Change Lombok from default compile scope to provided+optional so it
  does not propagate as a transitive dependency to downstream services
- Register Lombok as an explicit annotationProcessorPath in
  maven-compiler-plugin for Java 9+ module system compatibility
- Add NOTICE file acknowledging Lombok as a compile-time dependency
- Add THIRD-PARTY-LICENSES/lombok-LICENSE.txt with full MIT license text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
uid2-shared is a library; optional already prevents transitive
propagation. provided is redundant since Maven doesn't bundle
deps in library JARs regardless of scope.
@sunnywu sunnywu force-pushed the syw-UID2-1750-lombok-license-compliance branch from a0f30cb to 7b89524 Compare April 7, 2026 05:07
@sunnywu sunnywu merged commit 1c88c5b into main Apr 7, 2026
3 checks passed
@sunnywu sunnywu deleted the syw-UID2-1750-lombok-license-compliance branch April 7, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants