Jacoco agent does not measure any code coverage run by exec-maven-plugin
<p>I want measure code coverage with exec-maven-plugin and jacoco together.</p>

<p>For now, I can execute my Main class (without cover) and I can measure my coverage of my unit tests. I want to measure code coverage when running my main class.</p>

<p><strong>Run my Main class is OK (clean compile exec:java):</strong></p>

<pre><code>&lt;profiles&gt;
        &lt;profile&gt;
            &lt;id&gt;scenarioInitiator&lt;/id&gt;
            &lt;build&gt;
                &lt;plugins&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.2.1&lt;/version&gt;
                        &lt;configuration&gt;
                            &lt;mainClass&gt;com.mycompany.Main&lt;/mainClass&gt;
                            &lt;arguments&gt;
                                &lt;argument&gt;123456&lt;/argument&gt;
                            &lt;/arguments&gt;
                        &lt;/configuration&gt;
                    &lt;/plugin&gt;
                &lt;/plugins&gt;
            &lt;/build&gt;
        &lt;/profile&gt;
&lt;/profiles&gt;
</code></pre>

<p><strong>My jacoco configuration for unit test is OK (clean test):</strong></p>

<pre><code>&lt;plugins&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.7.5.201505241946&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;append&gt;true&lt;/append&gt;
                &lt;/configuration&gt;
                &lt;executions&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;destFile&gt;${project.build.directory}/coverage-reports/jacoco-ut.exec&lt;/destFile&gt;
                            &lt;propertyName&gt;surefireArgLine&lt;/propertyName&gt;
                        &lt;/configuration&gt;
                    &lt;/execution&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;dataFile&gt;${project.build.directory}/coverage-reports/jacoco-ut.exec&lt;/dataFile&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;/plugins&gt;
</code></pre>