Lombok not working in a Netbeans project

后端 未结 4 1494
遥遥无期
遥遥无期 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:04

    configure the pom

    
        src/main/java
    
    
    
        
            lombok-build
            
                ${project.build.directory}/generated-sources/delombok
            
        
    
    
    
    
        org.projectlombok
        lombok
        1.16.8
        provided
    
    
        
            ${src.dir}
        
            
                org.projectlombok
                lombok-maven-plugin
                1.16.16.0
                
                    
                        generate-sources
                        
                            delombok
                        
                        
                            src/main/java
                            false
                        
                    
                
            
        
    
    

    Then, specify lombok-build as the active profile for various actions (build, debug etc) under Project Properties->Actions->Activate Profiles.

    At this blog there is a github sample project and the configuration with pictures to use lastest version of maven+netbeans+lombok, that works for me.

提交回复
热议问题