We currently run our testsuite with fork=none which causes us some small issues:
- First, we're exposed to whatever system properties Maven might use internally which could impact our build.
- Secondly, it makes it difficult to have per-project log4j settings that are not hardcoded in the source code.
So, what is suggested here is that we switch to fork=once so that each module's testsuite runs in a different JVM. The overhead of this is apparently pretty small (needs double checking).
In terms of logging, this potentially enables each module to have its own 'trace-enabling' profile pointing to its own TRACE enabled log4j file, making it quite easy for each module to define what TRACE is relevant for each. For example:
This has another advantage which is allowing us to override the log output directory selectively which is handy in a CI environment such as CloudBees:
- First, set the logs location to be dependant on another system property, i.e.:
- And then, selectively change it: