We have a need to be able to skip a submodule in certain environments.
The module in question contains integration tests and takes half an hour to run. So we want t
The notion of multi-module projects is there to service the needs of codependent segments of a project. Such a client depends on the services which in turn depends on say EJBs or data-access routines. You could group your continuous integration (CI) tests in this manner. I would rationalize that by saying that the CI tests need to be in lock-step with application logic changes.
Suppose your project is structured as:
project-root
|
+ --- ci
|
+ --- client
|
+ --- server
The project-root/pom.xml defines modules
ci
client
server
The ci/pom.xml defines profiles such as:
...
default
true
maven-surefire-plugin
true
CI
maven-surefire-plugin
false
This will result in Maven skipping tests in this module except when the profile named CI is active.
Your CI server must be instructed to execute mvn clean package -P CI. The Maven web site has an in-depth explanation of the profiling mechanism.