Maven: excluding java files in compilation

前端 未结 5 988
甜味超标
甜味超标 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:03

    If you want to exclude the java sources from compiling, then mention them in the Maven Compiler Plugin definition

    
        
            org.apache.maven.plugins
            maven-compiler-plugin
            2.0.2
            
                
                  src/main/java/api/test/omi/*.java
                
            
        
    
    

    The resources plugin only defines what all resources to bundle in your final artifact.

提交回复
热议问题