title: JaCoCo not generating jacoco.exec until after skipping JaCoCo execution
body: <p>I'm having trouble generating AHP reports via JaCoCo in one of my modules. When the build starts, I see JaCoCo correctly setting argLine with:</p>
  
  <pre><code>[INFO] jacoco.agent.argLine set to -javaagent:&lt;...&gt;/.m2/repository/org/jacoco/org.jacoco.agent/0.7.2.201409121644/org.jacoco.agent-0.7.2.201409121644-runtime.jar=destfile=&lt;...&gt;/target/jacoco.exec
  </code></pre>
  
  <p>However, the .exec hasn't been created yet by the time maven tries to run JaCoCo:</p>
  
  <pre><code>[INFO] Skipping JaCoCo execution due to missing execution data file:&lt;...&gt;/target/jacoco.exec
  </code></pre>
  
  <p>The jacoco.exec does eventually get created, after maven has skipped JaCoCo execution. Therefore, I can still generate AHP reports, if I re-run the build without cleaning.</p>
  
  <p>I've seen in various other questions that I need to be careful using Maven Surefire with JaCoCo. However, I don't explicitly use argLine in my Surefire plugins, or in any plugin for that matter. I'm starting to wonder if one of the other plugins is hijacking the argLine parameter automatically like JaCoCo does.</p>
  
  <p>Here is a list of all plugins used:</p>
  
  <ul>
  <li>jacoco-maven-plugin</li>
  <li>vertx-maven-plugin</li>
  <li>maven-resources-plugin</li>
  <li>maven-dependency-plugin</li>
  <li>maven-surefire-plugin</li>
  <li>maven-failsafe-plugin</li>
  <li>maven-surefire-report-plugin</li>
  <li>maven-assembly-plugin</li>
  </ul>
  
  <p>I do see one suspicious message in the build output:</p>
  
  <pre><code>[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ &lt;module&gt; ---
  [INFO] Changes detected - recompiling the module!
  </code></pre>
  
  <p>I'm not sure if that's relevant, but it appears twice before the Skipping message, and doesn't appear in a module where JaCoCo works properly.</p>
  
  <p>Any ideas?</p>
  
  <p>*edit - Here's the jacoco config</p>
  
  <pre><code>    &lt;plugins&gt;
          &lt;...&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.jacoco&lt;/groupId&gt;
              &lt;artifactId&gt;jacoco-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;${jacoco.version}&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;prepare-agent&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;report&lt;/id&gt;
                      &lt;phase&gt;prepare-package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;report&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                  &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                  &lt;version&gt;1.0.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;lifecycleMappingMetadata&gt;
                          &lt;pluginExecutions&gt;
                              &lt;pluginExecution&gt;
                                  &lt;pluginExecutionFilter&gt;
                                      &lt;groupId&gt;org.jacoco&lt;/groupId&gt;
                                      &lt;artifactId&gt;
                                          jacoco-maven-plugin
                                      &lt;/artifactId&gt;
                                      &lt;versionRange&gt;
                                          [0.7.2.201409121644,)
                                      &lt;/versionRange&gt;
                                      &lt;goals&gt;
                                          &lt;goal&gt;prepare-agent&lt;/goal&gt;
                                      &lt;/goals&gt;
                                  &lt;/pluginExecutionFilter&gt;
                                  &lt;action&gt;
                                      &lt;ignore&gt;&lt;/ignore&gt;
                                  &lt;/action&gt;
                              &lt;/pluginExecution&gt;
                          &lt;/pluginExecutions&gt;
                      &lt;/lifecycleMappingMetadata&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
  </code></pre>
  
  <p>I'm not sure exactly what that plugin management part is doing, but commenting it out doesn't fix anything. I've also tried putting the JaCoCo plugin config above the surefire/failsafe config in case order mattered for plugins sharing the same goals, but that didn't help either.</p>
  
  <p>*edit 2 - Looks like the problem was surefire's includes. Commenting them out somehow fixes JaCoCo's .exec generation, and JaCoCo works properly.</p>
  
  <pre><code>        &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;${maven.surefire.plugin.version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;!-- &lt;includes&gt;
                      &lt;include&gt;**/unit/**/*Test*.java&lt;/include&gt;
                  &lt;/includes&gt; --&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>Anyone know why?</p>