Lombok is not generating getter and setter

前端 未结 20 1733
走了就别回头了
走了就别回头了 2020-11-29 19:10

I just tried to send a Maven-based project to another computer and HORROR, red markers everywhere!!

However, mvn clean install is building just fine.

相关标签:
20条回答
  • 2020-11-29 19:26

    Remove @Getter from private static field.

    https://github.com/rzwitserloot/lombok/issues/1493

    0 讨论(0)
  • 2020-11-29 19:27

    Note that if you're using IntelliJ, you'll want to install the Lombok plugin (available from IDE settings) and also enable annotation processing.

    0 讨论(0)
  • 2020-11-29 19:29
    • If you use STS. You must have Lombok installed in your Eclipse by running lombok-xyz.jar

    • Please Try the Following the Steps:

      1. Include pom in Maven .
      2. Exit/Shutdown STS
      3. Find lombok Jar in ~/.m2/repository/org/projectlombok/lombok/version.x
      4. From Command Prompt/Shell java -jar lombok-1.x.y.jar

      5. Start STS

    Thats all.

    EDIT: I did this and was still showing errors, as mentioned in the comments. So I updated the project: right-click on project -> Maven -> Update Project and the errors disappeared.

    0 讨论(0)
  • 2020-11-29 19:29

    I am using Red hat Jboss developer studio. I solved this issue by:

    1. The project has lombok dependency. First look into your .m2 repository and find the lombok jar

    2. Double click on the jar, you will see installer there specify the path for IDE like C:\Users\xxx\devstudio\studio\devstudio.exe

    3. Restart the IDE and update the maven project the error will go

    0 讨论(0)
  • 2020-11-29 19:29

    If you are using maven , Go to maven dependencies in your project structure then run lombok jar as java project it will install it then exit and start eclipse

    0 讨论(0)
  • 2020-11-29 19:34

    If you use eclipse. You must have lombok installed in your Eclipse by running lombok-xyz.jar (e.g. you can find in ~/.m2/repository/org/projectlombok/lombok/1.12.6/lombok-1.12.6.jar).

    As the window of installation opened, you must choose the location of your Eclipse. And let it install lombok inside. You must restart your Eclipse afterwards.

    0 讨论(0)
提交回复
热议问题