title: Maven surefire plugin is not picking up groups options for testng
body: <p>I have a testng case with following annotation -</p>
  
  <p><code>@Test(groups="groupA", dataProvider="DataSet1")</code></p>
  
  <p>But when I trigger following maven command it does not execute the test -</p>
  
  <p><code>mvn test -Dgroups=groupA</code></p>
  
  <p>All I see in console is this -</p>
  
  <pre><code>...
  ...
  [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ abc-proj ---
  
  -------------------------------------------------------
  T E S T S
  -------------------------------------------------------
  Running TestSuite
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.733 sec -      in TestSuite
  
  Results :
  
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
  </code></pre>
  
  <p>But when I simply run <code>mvn test</code> it executes the test. Not sure why it is behaving like this. I am using Surefire plugin version <code>2.19.1</code> and testng version <code>6.9.9</code>. Any help will be appreciated.</p>
  
  <p><strong>EDIT</strong> I am not using testng.xml and just out of curiosity I tried same thing in a small project -> it works. In that project I created a sample class -</p>
  
  <pre><code>import org.testng.annotations.Test;
  
  public class SampleTest {
  
      @Test(groups = "groupA")
      public void testA() {
          System.out.println("Inside A");
      }
  
      @Test(groups = "groupB")
      public void testB() {
          System.out.println("Inside B");
      }
  
  }
  </code></pre>
  
  <p>And the <code>pom.xml</code> is -</p>
  
  <pre><code>... 
  &lt;properties&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
  
      &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;2.19.1&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;6.9.9&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Here the command <code>mvn test -Dgroups=groupA</code> works fine!</p>
  
  <p><strong>EDIT2</strong> When I removed the <code>dataProvider</code> annotation I noticed some different result, console now says - </p>
  
  <p><code>Tests run: 1, Failures: 0, Errors: 0, Skipped: 1</code></p>