Maven - Skip building test classes

后端 未结 5 1491
心在旅途
心在旅途 2021-01-30 19:36

Is there a simple way to not build the test classes?

mvn clean install -Dmaven.test.skip=true
5条回答
  •  一整个雨季
    2021-01-30 20:16

    I found a work-around in another question, which actually overrides a plugin execution by adding the following snippet in your pom.xml by default:

    
      
        
          org.apache.maven.plugins
          maven-compiler-plugin
          
            
              default-testCompile
              none
            
          
       
      
    
    

    This seems to work but definitely does not disable phase but disables the default actions that a plugin defines at a specific phase.

提交回复
热议问题