title: Unable to run cucumber test from command line - Success build response (No errors)
body: <blockquote>
    <p>Nothing to compile - all classes are up to date - getting this
    response from maven-compiler-plugin and no test cases are being
    executed for Selenium - Cucumber Test Runner file</p>
    
    <p>Changed the TestRunner name ending with test. Added the below
    configuration in POM.xml file</p>
  </blockquote>
  
  <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;version&gt;2.18&lt;/version&gt;
      &lt;configuration&gt;
      &lt;includes&gt;
      &lt;excludes&gt;**/*TestRunnertest.java&lt;/excludes&gt;
      &lt;/includes&gt;
      &lt;/configuration&gt;
      &lt;/plugin&gt;
  </code></pre>
  
  <h2>POM.xml</h2>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;corporate&lt;/groupId&gt;
    &lt;artifactId&gt;web&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;web&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
  
  &lt;properties&gt;
  
   &lt;project.build.sourceEncoding&gt;UTF8&lt;/project.build.sourceEncoding&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-compiler-plugin&lt;/artifactId&gt; 
      &lt;version&gt;3.6.1&lt;/version&gt;
      &lt;/plugin&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.18&lt;/version&gt;
      &lt;configuration&gt;
      &lt;includes&gt;
      &lt;excludes&gt;**/*TestRunnertest.java&lt;/excludes&gt;
      &lt;/includes&gt;
      &lt;/configuration&gt;
      &lt;/plugin&gt;
  
    &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
      &lt;groupId&gt;com.aventstack&lt;/groupId&gt;
      &lt;artifactId&gt;extentreports&lt;/artifactId&gt;
      &lt;version&gt;3.0.7&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
      &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
      &lt;version&gt;3.141.59&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
      &lt;artifactId&gt;selenium-chrome-driver&lt;/artifactId&gt;
      &lt;version&gt;3.141.59&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
      &lt;artifactId&gt;cucumber-java&lt;/artifactId&gt;
      &lt;version&gt;4.2.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;junit&lt;/groupId&gt;
    &lt;artifactId&gt;junit&lt;/artifactId&gt;
    &lt;version&gt;4.11&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
          &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-junit&lt;/artifactId&gt;
          &lt;version&gt;2.3.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
      &lt;artifactId&gt;commons-email&lt;/artifactId&gt;
      &lt;version&gt;1.5&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.directory.studio&lt;/groupId&gt;
      &lt;artifactId&gt;org.apache.commons.io&lt;/artifactId&gt;
      &lt;version&gt;2.4&lt;/version&gt;
  &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <h2>TestRunner</h2>
  
  <pre><code>@RunWith(Cucumber.class)
  @CucumberOptions(
          features = "/Users/neha/eclipse-workspace/webCorp/src/test/java/feature", //the path of the feature files
          glue={"stepDefinition"}, //the path of the step definition files
          //format = { "pretty", "json:target/json/output.json" }, 
          tags = { "~@ignore" },
          plugin= {"com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report.html"}, //to generate different types of reporting
          monochrome = true, //display the console output in a proper readable format`enter code here`
          strict = true, //it will check if any step is not defined in step definition file
          dryRun = false //to check the mapping is proper between feature file and step def file
  
          )
  
  public class TestRunnertest  {
  
      @BeforeClass
      public static void startup() {
          System.out.println("Starting test");
      }
  }
  </code></pre>
  
  <ul>
  <li><p>I expect to be able to run the TestRunner file from commandline using
  the cmd mvn test
  -Dcucumber.options=”/Users/neha/eclipse-workspace/webCorp/src/main/java/testRunner/TestRunner.java”</p>
  
  <p>I am able to run the code from eclipse by removing cucumber-java, junit and cucmber-junit dependency from pom.xml</p></li>
  </ul>