Q:

TestNG test skipped while running with groups and dataProvider values

Tests are skipped with below code,
@Test(groups = { "sanity", "prod" }, dataProviderClass = ReqRespDataProvider.class, dataProvider = "sampleTestData")
public void sampleMethodTest(Map<DataType, String> map){

}

Running with
mvn clean install test -Dgroups=sanity

Results:
Running TestSuite
Tests run: 2, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 5.426 sec

A:

-Dgroups=sanity on a Maven command line does nothing but defining a property meant to be used in the project's POM. 
To define groups to test you have to declare them for the Surefire Plugin accordingly:
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>3.0.0-M3</version>
    <configuration>
      <groups>${groups}</groups>
    </configuration>
  </plugin>

BTW, ... install test ... isn't necessary, since invoking Maven's install phase passes the test phase anyway.