Maven: excluding java files in compilation

前端 未结 5 989
甜味超标
甜味超标 2020-12-01 00:41

I have a folder of java sources which I wish to exclude from the compilation.

My folder is under qa/apitests/src/main/java/api/test/omi.

I added

5条回答
  •  醉话见心
    2020-12-01 01:16

    The top voted answer works fine but it doesn't allow forcing the exclusion when the excluded class/classes is/are being used by not-excluded ones.

    Workaround using maven-antrun-plugin:

    
        org.apache.maven.plugins
        maven-antrun-plugin
        1.8
        
            
                process-classes
                
                    run
                
            
        
        
            
                
            
        
    
    

提交回复
热议问题