How to configure Lombok with maven-compiler-plugin?

前端 未结 7 2034
长情又很酷
长情又很酷 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:30

    I was using Java 8 and @Getter(onMethod = @__({@NoSerialization})) and @Getter(onMethod = @__({@Translation(messageKey = "translation.key")})) onX annotations. And I get duplicate element '' in annotation @. in error output. Looks like guys from Lombok have such issue with Java 8 for a long time link to issue on github. Lombok does not handle annotations with parameters like messageKey in annotation above. it works only with annotations without parameters and annotations with only value parameter (when you don't write the name of parameter).

提交回复
热议问题