Here's my pom.xml:
<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"> Â Â Â Â <modelVersion>4.0.0</modelVersion> Â Â Â Â <groupId>selenium-cucumber</groupId> Â Â Â Â <artifactId>selenium-cucumber-java</artifactId> Â Â Â Â <version>0.0.1</version> Â Â Â Â <packaging>jar</packaging> Â Â Â Â <name>selenium-cucumber-java</name> Â Â Â Â <dependencies> Â Â Â Â Â Â Â Â <!-- These are the cucumber dependencies --> Â Â Â Â Â Â Â Â <dependency> Â Â Â Â Â Â Â Â Â Â Â Â <groupId>info.cukes</groupId> Â Â Â Â Â Â Â Â Â Â Â Â <artifactId>cucumber-java</artifactId> Â Â Â Â Â Â Â Â Â Â Â Â <version>1.2.5</version> Â Â Â Â Â Â Â Â Â Â Â Â <scope>test</scope> Â Â Â Â Â Â Â Â </dependency> Â Â Â Â Â Â Â Â <!-- These are the cucumber-junit dependencies --> Â Â Â Â Â Â Â Â <dependency> Â Â Â Â Â Â Â Â Â Â Â Â <groupId>info.cukes</groupId> Â Â Â Â Â Â Â Â Â Â Â Â <artifactId>cucumber-junit</artifactId> Â Â Â Â Â Â Â Â Â Â Â Â <version>1.2.2</version> Â Â Â Â Â Â Â Â Â Â Â Â <scope>test</scope> Â Â Â Â Â Â Â Â </dependency> Â Â Â Â Â Â Â Â <!-- These are the junit dependencies --> Â Â Â Â Â Â Â Â <dependency> Â Â Â Â Â Â Â Â Â Â Â Â <groupId>junit</groupId> Â Â Â Â Â Â Â Â Â Â Â Â <artifactId>junit</artifactId> Â Â Â Â Â Â Â Â Â Â Â Â <version>4.12</version> Â Â Â Â Â Â Â Â Â Â Â Â <scope>test</scope> Â Â Â Â Â Â Â Â </dependency> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <!-- These are the selenium-webdriver dependencies --> Â Â Â Â Â Â Â Â Â Â Â <dependency> Â Â Â Â Â Â Â Â Â Â Â Â <groupId>org.seleniumhq.selenium</groupId> Â Â Â Â Â Â Â Â Â Â Â Â <artifactId>selenium-java</artifactId> Â Â Â Â Â Â Â Â Â Â Â Â <version>3.3.1</version> Â Â Â Â Â Â Â Â </dependency> Â Â Â Â Â Â Â Â Â Â Â Â <dependency> Â Â Â Â Â Â Â Â Â Â Â Â <groupId>org.seleniumhq.selenium</groupId> Â Â Â Â Â Â Â Â Â Â Â Â <artifactId>selenium-server</artifactId> Â Â Â Â Â Â Â Â Â Â Â Â <version>3.3.1</version> Â Â Â Â Â Â Â Â </dependency> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <!-- These are the selenium-cucumber methods dependencies --> Â Â Â Â Â Â Â Â <dependency> Â Â Â Â Â Â Â Â Â Â Â Â <groupId>sample</groupId> Â Â Â Â Â Â Â Â Â Â Â Â <artifactId>com.sample</artifactId> Â Â Â Â Â Â Â Â Â Â Â Â <version>1.0.0</version> Â Â Â Â Â Â Â Â Â Â Â Â <type>jar</type> Â Â Â Â Â Â Â Â Â Â Â Â <scope>system</scope> Â Â Â Â Â Â Â Â Â Â Â Â <systemPath>${project.basedir}/src/main/resources/selenium-cucumber-methods-1.0.0.jar</systemPath> Â Â Â Â Â Â Â Â </dependency> Â Â Â Â Â </dependencies> Â Â Â Â Â Â Â Â <build> Â Â Â Â Â Â Â Â <plugins> Â Â Â Â Â Â Â Â Â Â Â Â <plugin> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <groupId>org.apache.maven.plugins</groupId> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <artifactId>maven-compiler-plugin</artifactId> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <version>3.2</version> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <configuration> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <encoding>UTF-8</encoding> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <source>1.7</source> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <target>1.7</target> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <compilerArgument>-Werror</compilerArgument> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <systemPropertyVariables> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <property> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <name>browser</name> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <value>${browser}</value> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </property> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </systemPropertyVariables> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </configuration> Â Â Â Â Â Â Â Â Â Â Â Â </plugin> Â Â Â Â Â Â Â Â </plugins> Â Â Â Â </build> </project>
Browser: Firefox
[31mFailed scenarios:[0m [31mfeatures/my_first.feature:4 [0m# Scenario: I login with valid credential 1 Scenarios ([31m1 failed[0m) 7 Steps ([31m1 failed[0m, [36m6 skipped[0m) 0m0.403s java.lang.ExceptionInInitializerError     at stepDefintions.PredefinedStepDefinitions.navigate_to(PredefinedStepDefinitions.java:20)     at â½.Given I navigate to "
http://www.gmail.com"(features/my_first.feature:5) Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see
https://github.com/mozilla/geckodriver. The latest version can be downloaded from
https://github.com/mozilla/geckodriver/releases     at com.google.common.base.Preconditions.checkState(Preconditions.java:738)     at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:111)     at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:38)     at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:112)     at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:302)     at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:233)     at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:125)     at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:121)     at env.Env.CreateWebDriver(Env.java:35)     at env.BaseTest.<clinit>(BaseTest.java:18)     at stepDefintions.PredefinedStepDefinitions.navigate_to(PredefinedStepDefinitions.java:20)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at cucumber.runtime.Utils$1.call(Utils.java:40)     at cucumber.runtime.Timeout.timeout(Timeout.java:16)     at cucumber.runtime.Utils.invoke(Utils.java:34)     at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38)     at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)     at cucumber.runtime.Runtime.runStep(Runtime.java:300)     at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)     at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)     at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)     at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:91)     at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)     at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)     at org.junit.runners.ParentRunner.run(ParentRunner.java:363)     at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)     at cucumber.api.junit.Cucumber.runChild(Cucumber.java:93)     at cucumber.api.junit.Cucumber.runChild(Cucumber.java:37)     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)     at org.junit.runners.ParentRunner.run(ParentRunner.java:363)     at cucumber.api.junit.Cucumber.run(Cucumber.java:98)