question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compile with Lombok Annotations

See original GitHub issue

Hello,

i generate Java Files with Lombok Annotations from my own Annotation Processor, when testing i get the following compile error : “is not abstract and does not override abstract method”.

Test Case

    void process() {
        ReleationProcessor releationProcessor = new ReleationProcessor();
        Compilation compilation = javac()
                .withProcessors(releationProcessor)
                .compile(JavaFileObjects.forResource("TestFile.java"));
        CompilationSubject.assertThat(compilation).succeeded();

Generated File from Annotation Processor

@Setter
@Getter
public final class Testing implements Model {
  private String targetType;
}

On my normal build everything works fine. Is there some way to ignore the compile error or add an option for Lombok Annotations.

Ty Mom0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
esfomeadocommented, Oct 14, 2022

@tbroyer How? What is the Lombok processor class name?

0reactions
tbroyercommented, Aug 31, 2022

Fwiw, you would have to add the Lombok processor to the withProcessors so it can do its (black) magic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't compile project when I'm using Lombok under IntelliJ IDEA
If you still have annotation not recognized, place cursor on it, hit ALT+ENTER (or OPTION+ENTER) and see if you have a menu option...
Read more >
Setting up Lombok with Eclipse and Intellij - Baeldung
Lombok uses annotation processing through APT. So, when the compiler calls it, the library generates new source files based on annotations ...
Read more >
A Complete Guide to Lombok - Auth0
Lombok offers various annotations aimed at replacing Java code that is well known for being boilerplate, repetitive, or tedious to write.
Read more >
Lombok annotations do not compile under Intellij idea
Lombok annotations do not compile under Intellij idea. What steps will reproduce the problem? 1. enabled Lombok and appended to classpath through maven...
Read more >
Lombok Execution Path
With javac (and netbeans, maven, gradle, and most other build systems), lombok runs as an annotation processor. Lombok is on the classpath, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found