title: Jenkins jacoco plugin empty report
body: <p>I have a project where I use Jacoco to calculate the code coverage.
  I use maven configuration like here :</p>
  
  <p><a href="http://www.petrikainulainen.net/programming/maven/creating-code-coverage-reports-for-unit-and-integration-tests-with-the-jacoco-maven-plugin/" rel="noreferrer">http://www.petrikainulainen.net/programming/maven/creating-code-coverage-reports-for-unit-and-integration-tests-with-the-jacoco-maven-plugin/</a></p>
  
  <p>With Jenkins, I run "mvn clean install test". It generates the report in the /target/site/jacoco-ut/ folder. If I open the index.html file, I see this :</p>
  
  <p><a href="https://i.stack.imgur.com/3vIzC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3vIzC.png" alt="enter image description here"></a></p>
  
  <p>But when I open JaCoCo Coverage Report in jenkins job, I see this :</p>
  
  <p><a href="https://i.stack.imgur.com/VIJVI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VIJVI.png" alt="enter image description here"></a></p>
  
  <p>It says that every test cover 0% of the code. I don't understand why I don't have the same result that I have in the html report.</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.jacoco&lt;/groupId&gt;
              &lt;artifactId&gt;jacoco-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;0.7.5.201505241946&lt;/version&gt;
              &lt;executions&gt;
                  &lt;!--
                      Prepares the property pointing to the JaCoCo runtime agent which
                      is passed as VM argument when Maven the Surefire plugin is executed.
                  --&gt;
                  &lt;execution&gt;
                      &lt;id&gt;pre-unit-test&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;prepare-agent&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;!-- Sets the path to the file which contains the execution data. --&gt;
                          &lt;destFile&gt;${project.build.directory}/coverage-reports/jacoco-ut.exec&lt;/destFile&gt;
                          &lt;!--
                              Sets the name of the property containing the settings
                              for JaCoCo runtime agent.
                          --&gt;
                          &lt;propertyName&gt;surefireArgLine&lt;/propertyName&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
                  &lt;!--
                      Ensures that the code coverage report for unit tests is created after
                      unit tests have been run.
                  --&gt;
                  &lt;execution&gt;
                      &lt;id&gt;post-unit-test&lt;/id&gt;
                      &lt;phase&gt;test&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;report&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;!-- Sets the path to the file which contains the execution data. --&gt;
                          &lt;dataFile&gt;${project.build.directory}/coverage-reports/jacoco-ut.exec&lt;/dataFile&gt;
                          &lt;!-- Sets the output directory for the code coverage report. --&gt;
                          &lt;outputDirectory&gt;${project.reporting.outputDirectory}/jacoco-ut&lt;/outputDirectory&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.15&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;skip&gt;true&lt;/skip&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;surefire-unit-tests&lt;/id&gt;
                      &lt;phase&gt;test&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;test&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;!-- Sets the VM argument line used when unit tests are run. --&gt;
                          &lt;argLine&gt;${surefireArgLine}&lt;/argLine&gt;
                          &lt;!-- Skips unit tests if the value of skip.unit.tests property is true --&gt;
                          &lt;skipTests&gt;${skip.unit.tests}&lt;/skipTests&gt;
                          &lt;!-- Excludes integration tests when unit tests are run. --&gt;
                          &lt;skip&gt;false&lt;/skip&gt;
                          &lt;excludes&gt;
                              &lt;exclude&gt;**/*IntegrationTests.java&lt;/exclude&gt;
                          &lt;/excludes&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&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.15&lt;/version&gt;
              &lt;executions&gt;
                  &lt;!--
                      Ensures that both integration-test and verify goals of the Failsafe Maven
                      plugin are executed.
                  --&gt;
                  &lt;execution&gt;
                      &lt;id&gt;integration-tests&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;integration-test&lt;/goal&gt;
                          &lt;goal&gt;verify&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;!-- Sets the VM argument line used when integration tests are run. --&gt;
                          &lt;argLine&gt;${failsafeArgLine}&lt;/argLine&gt;
                          &lt;!--
                              Skips integration tests if the value of skip.integration.tests property
                              is true
                          --&gt;
                          &lt;skipTests&gt;${skip.integration.tests}&lt;/skipTests&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>And my jenkins configuration :</p>
  
  <p><a href="https://i.stack.imgur.com/4F0NK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4F0NK.png" alt="enter image description here"></a></p>
  
  <p>What is my error ?</p>