I noticed that the sonar:sonar step adds an extra build stage with the same name as my top level pom.xml. e.g.
Building my-project 1.0.1 [1/14]
.
.
.
Building my-project 1.0.1 [15/14]
Which overrides the default project name. That hides the sonar build time while giving the impression it occurs first.
The plugin also seems to save all the sonar analysis until the end. Is there any option to run the analysis in parallel? i.e. As soon as a module is built kick of its analysis while the subsequent modules are being built?
The goal here would be to reduce the overall time spent building. I’ve a 15 minute build, of which sonar takes 2 minutes. Given past experience with other tools that’s actually quick. But none the less it’d be better if it could be reduced further.
The Sonar plugin needs to be able to process all of the build artifacts, including the unit test results, which can only be done after all of the other build steps are complete. It cannot run in parallel with any typical build step.
This sounds like the authoritative answer. But I’m curious, in a Maven multi-module project each module builds and runs its own unit tests. Once a module is finished building would sonar not be able to analysis it? i.e. While the remaining modules continuing to build.