]> juplo.de Git - demos/kafka/training/commitdiff
fix: Lombok in Maven korrekt als optional deklarieren
authorClaude <noreply@anthropic.com>
Sun, 17 May 2026 15:02:29 +0000 (15:02 +0000)
committerKai Moritz <kai@juplo.de>
Sun, 17 May 2026 15:41:06 +0000 (17:41 +0200)
Lombok war mit <scope>compile</scope> deklariert, was dazu führt, dass
es als transitive Abhängigkeit weitergegeben wird. Da Lombok ein reines
Compile-Zeit-Tool (Annotation Processor) ist, muss es als <optional>true</optional>
markiert werden. Der Spring-Boot-Maven-Plugin schließt optionale
Abhängigkeiten automatisch aus dem fat-JAR aus.

Das Gradle-Setup ist in diesem Punkt bereits korrekt (compileOnly +
annotationProcessor).

pom.xml

diff --git a/pom.xml b/pom.xml
index d337686bd4d996387383764c53b18bb17cf7868f..ac72994e14111c1e9ccb5e534c7c2e2c31d1ee17 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -46,7 +46,7 @@
     <dependency>
       <groupId>org.projectlombok</groupId>
       <artifactId>lombok</artifactId>
-      <scope>compile</scope>
+      <optional>true</optional>
     </dependency>
     <dependency>
       <groupId>org.springframework.boot</groupId>