title: Jacoco Jenkins plugin working but maven report showing 0% coverage
body: <p>I am wanting to collect coverage metrics with JaCoCo for Restassured based integration tests running against an external JVM process all orchestrated in Maven 3.</p>
  
  <p>I have the following setup:</p>
  
  <ol>
  <li>The pre-integration-test phase exec's the java process via ant to fork it off in it's own process, passing the jacoco agent arg</li>
  <li>The post-integration-test phase exec's a script that kills the pid of that process</li>
  <li>jacoco's javaco-it.exec file is found in the target directory the end of the mvn run but the html report shows 0% coverage  (Sessions show all the classes that it collected.) </li>
  <li>When run in Jenkins with the Jacoco plugin, the reports there look fine.</li>
  </ol>
  
  <p>I see many people asking similar questions here and around the web, but most are using Sonar and their solutions all seem to be Sonar-centric.  I am really needing the maven plugin version (sans-Sonar) to work.</p>
  
  <p>Here is the pertinent portion of my pom.xml:</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.1.201405082137&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-prepare-agent&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;prepare-agent&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-prepare-agent-integration&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;prepare-agent-integration&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;includes&gt;
                              &lt;include&gt;com.mydomain.*&lt;/include&gt;
                          &lt;/includes&gt;
                          &lt;classDumpDir&gt;${project.build.directory}/jacoco-it-classes&lt;/classDumpDir&gt;
                          &lt;propertyName&gt;jacocoArgLine&lt;/propertyName&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-report&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;report&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-report-integration&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;report-integration&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-check&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;check&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;rules&gt;
                              &lt;rule&gt;
                                  &lt;element&gt;METHOD&lt;/element&gt;
                              &lt;/rule&gt;
                          &lt;/rules&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.6&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-cli&lt;/id&gt;
                      &lt;phase&gt;pre-integration-test&lt;/phase&gt;
                      &lt;configuration&gt;
                          &lt;tasks&gt;
                              &lt;java fork="true" classpathref="maven.runtime.classpath"
                                    className="com.mydomain.MainApp" spawn="true"&gt;
                                  &lt;jvmarg value="${jacocoArgLine}"/&gt;
                              &lt;/java&gt;
                          &lt;/tasks&gt;
                      &lt;/configuration&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.3.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;kill-app&lt;/id&gt;
                      &lt;phase&gt;post-integration-test&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;exec&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;bash&lt;/executable&gt;
                  &lt;commandlineArgs&gt;killApp.sh&lt;/commandlineArgs&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>When run via "mvn clean install" I see the following in the output:</p>
  
  <pre><code>[INFO] --- jacoco-maven-plugin:0.7.1.201405082137:report (default-report) @ integration-tests ---
  [INFO] Analyzed bundle 'integration-tests' with 0 classes
  [INFO]
  [INFO] --- jacoco-maven-plugin:0.7.1.201405082137:report-integration (default-report-integration) @ integration-tests ---
  [INFO] Analyzed bundle 'integration-tests' with 0 classes
  </code></pre>
  
  <p>One thing to note: I am having to use the classDumpDir since there are jar dependencies in the VM that I want coverage stat's from that aren't part of this Maven project.   Is there some setting I'm not seeing in the doc's to tell the reporting goal about that class dir?</p>