UID2-1750: fix Lombok scope and add MIT license attribution#610
Merged
Conversation
Merged
3 tasks
jon8787
reviewed
Apr 7, 2026
| <groupId>org.projectlombok</groupId> | ||
| <artifactId>lombok</artifactId> | ||
| <version>1.18.34</version> | ||
| <scope>provided</scope> |
Contributor
There was a problem hiding this comment.
curious, do we actually need provided given there is no runtime and optional is there?
Contributor
Author
There was a problem hiding this comment.
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.
jon8787
approved these changes
Apr 7, 2026
- 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.
a0f30cb to
7b89524
Compare
jon8787
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
compilescope toprovided+optionalso it no longer propagates as a transitive dependency to downstream servicesannotationProcessorPathinmaven-compiler-pluginfor Java 9+ module system compatibilityNOTICEfile with Lombok copyright acknowledgment (compile-time only note)THIRD-PARTY-LICENSES/lombok-LICENSE.txtwith full MIT license textWhy
Lombok defaulting to
compilescope 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 bundlelombok.jar, triggering MIT attribution obligations in those projects. See UID2-1750.Test plan
mvn compilepasses (198 source files, 0 errors)mvn testpasses (439 tests, 0 failures)🤖 Generated with Claude Code