SonarQube
  1. SonarQube
  2. SONAR-3536

Make JaCoCo default coverage engine

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      In order to fully support Java 7 out of the box - JaCoCo should be activated by default. However Cobertura will still remain in Core.

        Issue Links

          Activity

          Hide
          Fabrice Bellingard added a comment -

          ITs updated.

          Show
          Fabrice Bellingard added a comment - ITs updated.
          Hide
          Fabrice Bellingard added a comment - - edited

          Noteworthy:
          With Cobertura, you could run "mvn clean sonar:sonar" and everything was handled correctly as the Sonar Cobertura plugin was internally launching the Maven Cobertura plugin that was forcing the compilation of sources and tests before executing the tests.
          Now, with JaCoCo as the default engine, you must make sure that the sources and tests are compiled before invoking "sonar:sonar", otherwise there won't be any test nor coverage results. This means that "mvn clean sonar:sonar" won't work any longer if you want to have test/coverage metrics: you will have to run "mvn clean verify/install" and then "mvn sonar:sonar" as this has always been advised on the documentation.
          Note that if your tests may fail, you will also have to add "-Dmaven.test.failure.ignore=true" otherwise the "verify/install sonar:sonar" won't be reached as the "test" phase will fail the build.

          Show
          Fabrice Bellingard added a comment - - edited Noteworthy : With Cobertura, you could run "mvn clean sonar:sonar" and everything was handled correctly as the Sonar Cobertura plugin was internally launching the Maven Cobertura plugin that was forcing the compilation of sources and tests before executing the tests. Now, with JaCoCo as the default engine, you must make sure that the sources and tests are compiled before invoking "sonar:sonar", otherwise there won't be any test nor coverage results. This means that "mvn clean sonar:sonar" won't work any longer if you want to have test/coverage metrics: you will have to run "mvn clean verify / install " and then "mvn sonar:sonar" as this has always been advised on the documentation . Note that if your tests may fail, you will also have to add "-Dmaven.test.failure.ignore=true" otherwise the "verify/install sonar:sonar" won't be reached as the "test" phase will fail the build.
          Hide
          Freddy Mallet added a comment -

          Manually tested !

          Show
          Freddy Mallet added a comment - Manually tested !

            People

            • Assignee:
              Fabrice Bellingard
              Reporter:
              Evgeny Mandrikov
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: