Is it possible to run a maven test build (mvn clean test) in a multi module maven project and to skip/ignore a particular module’s test? like -Dmaven.test.skip=true but for a particular module and not all the modules? I dont want to change the surefire <configuration> to include <skipTests>true</skipTests> for the module which I want to skip for tests. I wanted to know if this can be done from command line. I need this because in my project I’ve many modules and particular one or two takes really long to execute test, so when I want to test only couple of modules I’d like to skip these time taking modules to which I’ve not made any changes.
Is it possible to run a maven test build ( mvn clean test )
Share
Is is really a problem for you to change the configuration of the surefire plugin ? Because you could change it one time only in your module …
… and delegate the true/false value of the skipTests tag to a maven property, activated by a dedicated profile :
So that you could deactivate the tests in Foo module with the command line :
mvn clean test -P SKIP_FOO_MODULE_TESTS