How to configure Lombok with maven-compiler-plugin?

前端 未结 7 2022
长情又很酷
长情又很酷 2020-12-15 07:12

I have a root module and submodule in maven in the project. I am trying to use Lombok. I have added


    org.projectlombok&         


        
7条回答
  •  春和景丽
    2020-12-15 07:16

    I had this same issue and nothing worked, i.e. maven plugin version, annotationProcessorPaths, provided scope, etc.

    In the end I narrowed it down to having a static import on an @UtilityClass method from a class within the same project, i.e. not brought in from a dependency. This caused annotation processing to fail, even for unrelated classes, and made it look like lombok code was just not being compiled properly. Getting rid of the static import made it all work.

    There's an open issue on Github for this, though apparently it's too hard to fix.

提交回复
热议问题