Maven - How to compile tests without running them ?

前端 未结 7 1598
时光说笑
时光说笑 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:27

    Alternatively, you can use maven.test.skip.exec option.

    mvn -Dmaven.test.skip.exec=true
    

    Maven will compile the tests without running them. I use this option in all my projects regularly.

提交回复
热议问题