0

Starting position:

  • SonarQube 4.5.2
  • SonarRunner 2.4
  • Multi-module project
  • 4 modules

Goal: To run the sonar analysis for the modules, even if the sonar analysis of a module fails. And show the metrics of the multi-module project.

The problem is, if the sonar analysis of one module fails, the sonar analysis of the whole multi-module project fails. And I can't see anything in my SonarQube webbrowser.

My idea was that I run the sonar analysis for each module separately, but with the Project.Key of the module in the Multi-module project. The problem is that SonarQube creates a separate project with this Project.Key and "deletes" the module in the multi-module project.

Do you have any suggestion how to realize the mentioned goal?

Thanks in advance.

Stelos10
  • 451
  • 2
  • 6
  • 15

1 Answers1

0

This is not possible. If one of your modules fail to be analyzed correctly, simply remove it from your configuration.

  • Thanks for the first answer. I still have a question: I build all my .jar Files in an Nightly Build and after this I analyse the multi-module project. It's pretty usual, that one of the .jar-files, which I need to analyse a module, wasn't built correctly at night. Consequently I can't analyse the module. Let's say I have 10 modules. Every night a different one can't be analyzed. Consequently I can never analyse the whole multi-module project... Right? Thanks in advance. – Stelos10 Jan 29 '15 at 12:12
  • To be honest, if you "basic" build (compile + execute unit tests) fails, then it's pretty much useless to run a SonarQube analysis. You should first make sure that your build is always OK, and then you can concentrate on other quality stuff. – Fabrice - SonarSource Team Jan 29 '15 at 12:53
  • Alright, then I will only start my SonarQube analysis, when the build was successfull. Thanks for your help! But I still have a question is it possible to see older analysis versions in the SonarQube Webserver? Because I can't find any metric where I can tell the browser, show me analysis of older version... – Stelos10 Jan 29 '15 at 13:04
  • No it's not possible. You can just see the trend/evolution of the metrics. – Fabrice - SonarSource Team Jan 29 '15 at 13:11