title: Filter JUnit 5 test cases with the annotation @Tag("name_test") using Maven
body: <p>I want to filter my Junit 5 test cases, I am using the annotation <code>@Tag("type_test")</code>. I run my test with maven with the command <code>mvn -Dtests=a test</code> but it runs all the cases. For example, I have two methods and I want run only the method with <code>@Tag("a")</code>, but the result in console is "Hello word 1" and "Hello word 2". See the example code. </p>
  
  <pre><code>
      static Properties properties = null;
  
      @BeforeAll
          public static void setUp() throws Throwable {
          properties = CommonMethods.loadConfigPropertiesFile();
          RestAssured.baseURI = properties.getProperty("BASE_HOST");
      }
  
      @Test
      @Tag("a")
      public void test1() {
          System.out.println("hello word 1");
      }   
  
  
      @Test
      @Tag("b")
      public void test2() {
          System.out.println("hello word 2");
      }
  }
  </code></pre>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>    &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.19&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;properties&gt;
                          &lt;includeTags&gt;${tests}&lt;/includeTags&gt;
                      &lt;/properties&gt;
                  &lt;/configuration&gt;
                  &lt;dependencies&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.junit.platform&lt;/groupId&gt;
                          &lt;artifactId&gt;junit-platform-surefire-provider&lt;/artifactId&gt;
                          &lt;version&gt;1.0.0-M2&lt;/version&gt;
                      &lt;/dependency&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
                          &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;
                          &lt;version&gt;5.0.0-M2&lt;/version&gt;
                      &lt;/dependency&gt;
                  &lt;/dependencies&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
              &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;
              &lt;version&gt;5.0.0-M2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
              &lt;artifactId&gt;junit-jupiter-api&lt;/artifactId&gt;
              &lt;version&gt;5.0.0-M2&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  
  </code></pre>