Maven - How to compile tests without running them ?

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

    When executing a goal that will include the testing phase (such as package), you can do two things:

    • Use the command mvn -DskipTests=true package. This will compile all tests but not run them.
    • Or mvn -Dmaven.test.skip=true package. This will not compile or run the test branch.
    0 讨论(0)
提交回复
热议问题