title: Sonar does not read Jacoco reports
body: <p>I have a project whose Integration Tests are run by maven-failsafe-plugin and Unit Tests are run by maven-surefire-plugin. </p>
  
  <p>I use jacoco to generate the coverage reports:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;coverage.reports.dir&gt;${project.build.directory}/coverage-reports&lt;/coverage.reports.dir&gt;
      &lt;sonar.jacoco.reportPath&gt;${coverage.reports.dir}/jacoco-unit.exec&lt;/sonar.jacoco.reportPath&gt;
      &lt;sonar.jacoco.itReportPath&gt;${coverage.reports.dir}/jacoco-it.exec&lt;/sonar.jacoco.itReportPath&gt;
  &lt;/properties&gt;
  
  [...]
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.jacoco&lt;/groupId&gt;
              &lt;artifactId&gt;jacoco-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;0.5.7.201204190339&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;pre-integration-test&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;prepare-agent&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;propertyName&gt;jacoco.agent.argLine&lt;/propertyName&gt;
                  &lt;destFile&gt;${sonar.jacoco.itReportPath}&lt;/destFile&gt;
                  &lt;dataFile&gt;${sonar.jacoco.itReportPath}&lt;/dataFile&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
  [...]
  
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-failsafe-plugin&lt;/artifactId&gt;
            &lt;version&gt;2.5&lt;/version&gt;
            &lt;configuration&gt;
                &lt;argLine&gt;${jacoco.agent.argLine}&lt;/argLine&gt; 
            &lt;/configuration&gt;
      &lt;/plugin&gt;
  
  [...]
  
  &lt;profile&gt;
    &lt;id&gt;dev&lt;/id&gt;
    &lt;properties&gt;
      &lt;sonar.core.codeCoveragePlugin&gt;jacoco&lt;/sonar.core.codeCoveragePlugin&gt;
      &lt;sonar.dynamicAnalysis&gt;reuseReports&lt;/sonar.dynamicAnalysis&gt;
    &lt;/properties&gt;
  &lt;/profile&gt;
  
  [...]
  </code></pre>
  
  <p>When I run mvn install the Jacoco coverage reports are sucessfully generated.</p>
  
  <p>But when I run mvn -mvn -Pdev sonar:sonar Sonar uses the Cobertura plugin instead of Jacoco. </p>
  
  <p>I have tried:</p>
  
  <p>1) Set jacoco as the default coverage plugin in Sonar settings [did not work]</p>
  
  <p>2) Provide Jacoco parameters in the command line (e.g., -Dsonar.core.codeCoveragePlugin=jacoco) [did not work as well]</p>
  
  <p>Does anyone have any idea? Thanks.</p>
  
  <p>BTW I'm using Sonar 2.8</p>