Hudson + Maven + Emma/Sonar = Build Cycle Runs 2x -


I have a bunch of Maven projects in Hudson, who is sitting in the side-line with sonar. Sonar gives me sonar statistics, FindBugs statistics and code coverage.

I have seen that if I use gold or if I use EMMA directly through Maven, then the whole build cycle runs twice. Init (which makes my database expensive, in my case) and unit tests (some hundred - even expensive).

How can I stop it? I have read a lot, and it seems that this code-coverage is due to the design of the plugin - which is isolated from the unconscious sections of the instrument.

I have tried the configuration like this:

  • Maven Run: deployed, EMMA
  • Maven Run: Deployed; Posted on completion of sonar

    Sonar recommends running Sonar Plugin in 2 steps The tests are ignored for the first time and the steps run in the second step in the form.

    One line option is to run the following command: -

      Install mvn clean sonar: sonar -dmaven.test.failure .ignore = true   

    But this will run the test twice - as you've found.

Comments