How to configure Lombok with maven-compiler-plugin?

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

    This is not a direct answer to the question which seems to be solved but acts as reference for future searchers:

    If you're using Dagger (or something else) to process your annotations like

    
      
        
          org.apache.maven.plugins
          maven-compiler-plugin
          3.7.0
          
            
              
                com.google.dagger
                dagger-compiler
                2.15
              
            
            1.8
            1.8
          
        
        ....
      
    
    

    You have to add lombok as path like

    
      
        
          org.apache.maven.plugins
          maven-compiler-plugin
          3.7.0
          
            
              
                com.google.dagger
                dagger-compiler
                2.15
              
    
               
              
                org.projectlombok
                lombok
                1.16.20
              
    
    
            
            1.8
            1.8
          
        
        ....
      
    
    

    You still have to list lombok as provided dependency tho.

提交回复
热议问题