Skip to content

fix: Lombok Annotation Processing schlägt fehl (JDK23+) - #3

Open
BlockException wants to merge 1 commit into
JuByteCOM:masterfrom
BlockException:fix/lombok-annotation-processing
Open

fix: Lombok Annotation Processing schlägt fehl (JDK23+)#3
BlockException wants to merge 1 commit into
JuByteCOM:masterfrom
BlockException:fix/lombok-annotation-processing

Conversation

@BlockException

Copy link
Copy Markdown

Problem

Der Build schlägt mit ca. 100 Compiler-Fehlern fehl (z.B. getPlugin() erwartet
Class<T>, getUuid()/getHead()/getGiftRank() nicht gefunden,
CooldownPlayer-Konstruktor passt nicht). Alle Fehler haben dieselbe Ursache:
Lombok generiert keinen Code mehr (Getter, Setter, @AllArgsConstructor etc.).

Ursache

Seit JDK 23 startet Maven Annotation Processor nicht mehr automatisch nur
dadurch, dass sie im Classpath liegen. Lombok muss dem
maven-compiler-plugin explizit als annotationProcessorPath bekannt
gemacht werden (siehe projectlombok/lombok#3853). Da das bisher fehlte,
liefen Lombok-Annotationen (@Getter, @Data, @AllArgsConstructor)
ins Leere und der generierte Code fehlte komplett.

Fix

  • Lombok in maven-compiler-plugin explizit als annotationProcessorPath
    eingetragen
  • Lombok-Version auf 1.18.42 angehoben (Kompatibilität mit neueren JDKs)
  • Version über <lombok.version>-Property zentralisiert

Testing

  • mvn clean install läuft ohne Compiler-Fehler durch
  • Alle 100 zuvor gemeldeten Fehler sind auf diesen einen Root Cause
    zurückzuführen und damit behoben

@BlockException

Copy link
Copy Markdown
Author

@JustinSGD

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.

1 participant