title: Run feature file with cucumber java
body: <p>Im trying to run a simple feature file with java and intellij and I cant seem to get it working.</p>
  
  <p>Ive set up my Cukes test runner class</p>
  
  <pre><code>package config;
  
      import cucumber.api.CucumberOptions;
      import cucumber.api.junit.Cucumber;
      import org.junit.runner.RunWith;
  
  @RunWith(Cucumber.class)
  @CucumberOptions(monochrome = true,
      features = {"src/test/resources/features/"},
      dryRun = false,
      glue = "com.ecs.googleuat"
  )
  public class RunCukesTest {
  }
  </code></pre>
  
  <p>feature:
  Feature: home
    Scenario: home
      Given I am on the home page</p>
  
  <p>step definitions:</p>
  
  <pre><code>import cucumber.api.PendingException;
  import cucumber.api.java.en.Given;
  
  public class MyStepdefs {
  @Given("^I am on the home page$")
  public void iAmOnTheHomePage() {
      System.out.println("Hello");
  }
  }
  </code></pre>
  
  <p>project structure:</p>
  
  <p><a href="https://i.stack.imgur.com/fePTV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fePTV.png" alt="enter image description here"></a></p>
  
  <p>Im using a maven project with the java cucumber plugins.</p>
  
  <p>When I run the feature file I get the following error:</p>
  
  <p>Undefined step: Given  I am on the home page</p>
  
  <p>1 Scenarios (1 undefined)
  1 Steps (1 undefined)
  0m0.000s</p>
  
  <p>You can implement missing steps with the snippets below:</p>
  
  <pre><code>@Given("^I am on the home page$")
  public void i_am_on_the_home_page() throws Throwable {
  // Write code here that turns the phrase above into concrete actions
  throw new PendingException();
  }
  </code></pre>
  
  <p>Process finished with exit code 0</p>
  
  <p>Please help me understand what Im doing wrong.</p>
  
  <p>Thanks</p>