How to make QueryDSL and Lombok work together

前端 未结 3 689
天命终不由人
天命终不由人 2021-01-04 06:36

When a method or variable is annotated with Lombok annotation, the maven plugin will complain by processing the source generation for JPA.

I get this kind of failure

3条回答
  •  一个人的身影
    2021-01-04 06:58

    This solution worked for me. Add lombok.launch.AnnotationProcessorHider$AnnotationProcessor in your apt-maven-plugin configuration.

    
        com.mysema.maven
        apt-maven-plugin
        
            
                
                    process
                
                
                    target/generated-sources/java
                    com.querydsl.apt.jpa.JPAAnnotationProcessor,lombok.launch.AnnotationProcessorHider$AnnotationProcessor
                
            
        
    
    

    It seems also to be working the same way with gradle: See https://github.com/ewerk/gradle-plugins/issues/59#issuecomment-247047011

提交回复
热议问题