Maven - How to compile tests without running them ?

前端 未结 7 1602
时光说笑
时光说笑 2021-01-30 06:16

Is there a way in Maven to compile the tests without running them ? I want to use the IDE to run specific tests and not all of them.

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 06:26

    In case you really want to only compile the tests (skip all other phases like compile), this will do

    mvn org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile
    

    See the plugin bindings of the default lifecycle.

提交回复
热议问题