Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have done EXACTLY what you want to do and it works great. Unit tests "*Tests" always run, and "*IntegrationTests" only run when you do a mvn verify or mvn install. Here it the snippet from my POM. serg10 almost had it right....but not quite.</p> <pre class="lang-xml prettyprint-override"><code> &lt;plugin&gt; &lt;!-- Separates the unit tests from the integration tests. --&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;!-- Skip the default running of this plug-in (or everything is run twice...see below) --&gt; &lt;skip&gt;true&lt;/skip&gt; &lt;!-- Show 100% of the lines from the stack trace (doesn't work) --&gt; &lt;trimStackTrace&gt;false&lt;/trimStackTrace&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;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;!-- Never skip running the tests when the test phase is invoked --&gt; &lt;skip&gt;false&lt;/skip&gt; &lt;includes&gt; &lt;!-- Include unit tests within integration-test phase. --&gt; &lt;include&gt;**/*Tests.java&lt;/include&gt; &lt;/includes&gt; &lt;excludes&gt; &lt;!-- Exclude integration tests within (unit) test phase. --&gt; &lt;exclude&gt;**/*IntegrationTests.java&lt;/exclude&gt; &lt;/excludes&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;integration-tests&lt;/id&gt; &lt;phase&gt;integration-test&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;test&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;!-- Never skip running the tests when the integration-test phase is invoked --&gt; &lt;skip&gt;false&lt;/skip&gt; &lt;includes&gt; &lt;!-- Include integration tests within integration-test phase. --&gt; &lt;include&gt;**/*IntegrationTests.java&lt;/include&gt; &lt;/includes&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre> <p>Good luck!</p>
 

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