title: How to skip maven phase pre-integration-test if skipITs is set?
body: <p>I have some integration tests that depend on test data. This test data is created in phase <code>pre-integration-test</code> and removed in phase <code>post-integration-test</code>.</p>
  
  <p>My problem is that these phases are still executed if I use <code>-DskipITs</code> on the Maven commandline.</p>
  
  <p>Is there any way to make <code>-DskipITs</code> also skip the pre-integration-test and post-integration-test phases?</p>
  
  <p>This is the plugin definition in the pom:</p>
  
  <pre><code>&lt;plugin&gt;
  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
  &lt;artifactId&gt;sql-maven-plugin&lt;/artifactId&gt;
  &lt;version&gt;1.5&lt;/version&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
          &lt;version&gt;5.1.6&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;configuration&gt;
      &lt;driver&gt;com.mysql.jdbc.Driver&lt;/driver&gt;
      &lt;url&gt;${database.url}&lt;/url&gt;
      &lt;username&gt;${database.user}&lt;/username&gt;
      &lt;password&gt;${database.pw}&lt;/password&gt;
  &lt;/configuration&gt;
  
  &lt;executions&gt;
      &lt;execution&gt;
          &lt;id&gt;create-integration-test-data&lt;/id&gt;
          &lt;phase&gt;pre-integration-test&lt;/phase&gt;
          &lt;goals&gt;
              &lt;goal&gt;execute&lt;/goal&gt;
          &lt;/goals&gt;
          &lt;configuration&gt;
              &lt;orderFile&gt;descending&lt;/orderFile&gt;
              &lt;fileset&gt;
                  &lt;basedir&gt;${basedir}/src/test/resources/sql&lt;/basedir&gt;
                  &lt;includes&gt;
                      &lt;include&gt;AdministrationTestTeardown.sql&lt;/include&gt;
                      &lt;include&gt;AdministrationTestSetup.sql&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/fileset&gt;
          &lt;/configuration&gt;
      &lt;/execution&gt;
  
      &lt;execution&gt;
          &lt;id&gt;remove-data-after-test&lt;/id&gt;
          &lt;phase&gt;post-integration-test&lt;/phase&gt;
          &lt;goals&gt;
              &lt;goal&gt;execute&lt;/goal&gt;
          &lt;/goals&gt;
          &lt;configuration&gt;
              &lt;fileset&gt;
                  &lt;basedir&gt;${basedir}/src/test/resources/sql&lt;/basedir&gt;
                  &lt;includes&gt;
                      &lt;include&gt;AdministrationTestTeardown.sql&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/fileset&gt;
          &lt;/configuration&gt;
      &lt;/execution&gt;
  &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>