For a list of classes (which I can specify as a list of includes), I want to run with the forkMode=always because they mess with static state (legacy code).
For the remaining classes (which I can specify as excluding the classes above), I want to run with the forkMode=never, or some other configuration.
The motivation is that tests were taking forever to run with forkMode=always, because the classloader keeps having to reload everything, just to run tests from one test class!
Some other details: - all tests classes must run within the same profile (ie: -P release)
Is it possible to just have multiple :
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
within the same profile?
One way I could think of achieving this is defining multiple executions:
On the other side, you might want to migrate to using reuseForks and forkCount instead.