8

I'm working on one fairly big project (around maven 550 modules). Now, I was wondering how to run sonar on such a big project at the level of CI (we use Jenkins for this)

If we run mvn sonar:sonar out of parent pom folder, it runs for ~1 hour and then just fails on OutOfMemory even if we increase it significantly (~16GB)

So, we examine other strategies of running sonar. Currently the most appealing ideas are:

  1. Run sonar for each module during the lifecycle.

  2. Maintain the list of (sub)modules for which the sonar should be run in parallel during the post build phase.

So, I would like to ask what is the best way to run sonar for such a big project? Could someone please provide some generic configuration for implementing the first or second idea or describe any other way/best practices?

halfer
  • 19,824
  • 17
  • 99
  • 186
Mark Bramnik
  • 39,963
  • 4
  • 57
  • 97

1 Answers1

2

that sure are lot of modules. not sure if it is best practice or if you have already tried this but,

  1. u can configure plugin execution using profiles.
  2. also each profile will include very related set of modules for such build

now select profile one after another in required order to build.

Ref - http://maven.apache.org/guides/introduction/introduction-to-profiles.html taken from below stackoverflow post In Maven, how to run a plugin based on a specific profile

Community
  • 1
  • 1
Saurabh
  • 445
  • 6
  • 19
  • Yes, this is how we work now, we use profiles inside the build. Thought we could do better and utilize parallel maven builds or even incremental builds to work with sonar. I'm looking rather a methodology of integrating sonar into big projects. Thanks for the answer, 10 pts from me :) – Mark Bramnik Sep 07 '15 at 12:45