UID2-1750: add explicit Lombok dependency (was relying on transitive)#615
Merged
Conversation
uid2-admin uses Lombok annotations (@Getter, @AllArgsConstructor, lombok.val) but was relying on Lombok being leaked transitively from uid2-shared's compile-scope dependency. Now that uid2-shared correctly scopes Lombok as provided+optional, uid2-admin must declare it explicitly. - Add Lombok 1.18.34 as provided+optional dependency - Register Lombok as annotationProcessorPath in maven-compiler-plugin Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
I think we don't need provided and optional here because uid2-admin is a leaf project
Contributor
Author
There was a problem hiding this comment.
claude said:
- optional — agree. optional prevents the dependency from being inherited by downstream projects. Since uid2-admin is a leaf application (nothing
depends on it as a library), it has no downstream consumers, so optional is indeed pointless here. - provided — disagree. provided is actually correct for lombok regardless of whether it's a leaf project. Lombok is a compile-time annotation
processor — it generates bytecode at compile time and is not needed at runtime. Using provided keeps it out of the final fat JAR, which is the right
behavior. This is standard practice for lombok in Maven projects.
The reviewer's "leaf project" reasoning only fully applies to optional. For provided, the reasoning is about compile-time vs runtime, not about
dependency inheritance.
uid2-admin is a leaf project with no downstream consumers, so optional serves no purpose. Keep provided since lombok is compile-time only.
…explicit-dependency
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
provided+optionaldependency explicitly inpom.xmlannotationProcessorPathinmaven-compiler-pluginWhy
uid2-admin uses Lombok annotations (
@Getter,@AllArgsConstructor,lombok.valin 9 files) but was silently relying on Lombok leaking transitively from uid2-shared's incorrectcompile-scope declaration. The companion PR IABTechLab/uid2-shared#610 fixes uid2-shared to declare Lombok asprovided+optional, stopping the transitive leak. uid2-admin must therefore declare Lombok explicitly. See UID2-1750.Test plan
mvn compilepasses (151 source files, 0 errors)mvn testpasses (698 tests, 0 failures, 1 skipped)mvn dependency:tree | grep lombokshowsprovidedscope (notcompile)🤖 Generated with Claude Code