Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The above answer by Rogério does not work in windows (good work on JMockit btw) as the | character is a special character. To escape the | you need to add ^.</p> <p>e.g. </p> <pre><code>-Djmockit-coverage-excludes=packageA\..+^|packageB\..+^|com\.mydomain\..+ </code></pre> <p>This makes this solution not cross platform. For us this is a real issue as development is on Windows and the build server is linux.</p> <p>Can the coverage plugin read configuration properties from the plugin in the pom other than adding these command line arguments, if so, what are the tags?</p> <p>EDIT: I have updated my POM to cope with this in this way:</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;2.16&lt;/version&gt; &lt;configuration&gt; &lt;argLine&gt;-XX:MaxPermSize=256m -XX:-UseSplitVerifier ${jmockit-coverage-options}&lt;/argLine&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>... </p> <pre><code>&lt;profiles&gt; &lt;profile&gt; &lt;id&gt;os-windows&lt;/id&gt; &lt;activation&gt; &lt;os&gt; &lt;family&gt;windows&lt;/family&gt; &lt;/os&gt; &lt;/activation&gt; &lt;properties&gt; &lt;!-- See: http://code.google.com/p/jmockit/issues/detail?id=322 --&gt; &lt;!-- See: http://code.google.com/p/jmockit/issues/detail?id=323 --&gt; &lt;jmockit-coverage-options&gt;-Djmockit-coverage-outputDir=target/coverage-report -Djmockit-coverage-classes=PackageC\..+ -Djmockit-coverage-excludes=packageA\..+^|packageB\..+^|com\.mydomain\..+&lt;/jmockit-coverage-options&gt; &lt;/properties&gt; &lt;/profile&gt; &lt;profile&gt; &lt;id&gt;os-unix&lt;/id&gt; &lt;activation&gt; &lt;os&gt; &lt;family&gt;unix&lt;/family&gt; &lt;/os&gt; &lt;/activation&gt; &lt;properties&gt; &lt;!-- See: http://code.google.com/p/jmockit/issues/detail?id=322 --&gt; &lt;jmockit-coverage-options&gt;-Djmockit-coverage-outputDir=target/coverage-report -Djmockit-coverage-classes=PackageC\..+ -Djmockit-coverage-excludes=packageA\..+|packageB\..+|com\.mydomain\..+&lt;/jmockit-coverage-options&gt; &lt;/properties&gt; &lt;/profile&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload