title: How to configure maven for executing test ONLY on deploy
body: <p>I have maven surefire plugin on pom.xml:</p>
  <pre><code>&lt;build&gt; 
      &lt;plugins&gt;
          &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;3.0.0-M5&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;includes&gt;
                      &lt;include&gt;org.mycompany.service/*Test.java&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  <p>Now I want maven to execute test ONLY on <strong>deploy</strong> goal, therefore:</p>
  <ol>
  <li>When executing <em>mvn deploy</em> tests should run</li>
  <li>When executing <em>mvn package</em> or <em>mvn install</em>, tests should not run because goals are prior to deploy</li>
  </ol>