title: If argument in maven Surefire plugin, skip E2E tests
body: <p>I couldn't seem to find anything on this but I'm curious if I can pass an argument during runtime to skip all of our projects E2E tests. </p>
  
  <p>Is there anyway for me to do something like the segregated exclude block in the following pom example? </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;configuration&gt;
        &lt;argLine&gt;${argLine}&lt;/argLine&gt;
        &lt;excludes&gt;
  
           &lt;exclude unless="${skip.E2E.tests}&gt; **/*E2E*.java&lt;/exclude&gt;
  
           &lt;exclude&gt;**/IT*.java&lt;/exclude&gt;
        &lt;/excludes&gt;
     &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Then I could just call <code>mvn clean install -Dskip.E2E.tests=true</code>. Anybody seen anything like this? </p>
  
  <p>I suppose I could do something like...</p>
  
  <pre><code>&lt;exclude&gt;${name.of.tests.to.exclude}&lt;/exclude&gt;
  </code></pre>
  
  <p>and then <code>mvn clean install -Dname.of.tests.to.exclude=**/*E2E*.java</code>but I would prefer to get an easy true or false argument to set rather than this in case some of the tests I want to skip do not include E2E and I need to add them to a list. </p>