how to configure lombok in eclipse luna

后端 未结 13 900
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 09:45

I configure lombok in eclipse Luna with Maven. Annotation is added properly, but no getter and setter are generated.

eclipse.ini

`-vm E:\\Program Fil         


        
13条回答
  •  一生所求
    2020-11-30 10:21

    For Gradle users, if you are using Eclipse or one of its offshoots(I am using STS 4.5.1.RELEASE), all that you need to do is:

    • In build.gradle, you ONLY need these 2 "extra" instructions:

      dependencies {
        compileOnly 'org.projectlombok:lombok'  
        annotationProcessor 'org.projectlombok:lombok'
      }
      
    • Right-click on your project > Gradle > Refresh Gradle Project. The lombok-"version".jar will appear inside your project's Project and External Dependencies

    • Right-click on that lombok-"version".jar > Run As > Java Application (similar to double-clicking on the actual jar or running java -jar lombok-"version".jar on the command line.)

    • A GUI will appear, follow the instructions and one of the thing it does is to copy lombok.jar to your IDE's root.

    • The only other thing you will need to do(outside of the GUI) is to add that lombok.jar to your project build path



    That's it!

提交回复
热议问题