Lombok not working in a Netbeans project

后端 未结 4 1485
遥遥无期
遥遥无期 2021-02-08 04:36

I want to use Lombok in a project to use @Getter and @Setter.

I included using Maven:

    
        org.projectlombok<         


        
4条回答
  •  遇见更好的自我
    2021-02-08 05:11

    In Netbeans 8.2 using Apache Maven 3.5.4 use Lombok 1.18.4 or much older 1.16.16.

    In Netbeans 10.0/9.0 using Apache Maven 3.5.4 use Lombok 1.18.4, older versions of Lombok are really buggy when Compile On Save is used in Netbeans 10.0/9.0

    I updated Lombok to a new version

    
        org.projectlombok
        lombok
        provided
        1.18.8 
    
    

    NB

    • For maven-compiler-plugin, remove any annotationProcessorPaths to do with Lombok in the maven-compiler-plugin
    • Remove any Lombok maven plugins

    This is not needed, as Maven and Netbeans does this out of the box. You only need the right Lombok dependency in Maven.

提交回复
热议问题