title: Getting error "cucumber.runtime.CucumberException: Couldn't load plugin class: com.cucumber.listener.ExtentCucumberFormatter."
body: <p>I am trying to generate Extent report for my test run using Junit cucumber ,but i am getting error </p>
  
  <pre><code>"cucumber.runtime.CucumberException: Couldn't load plugin class: com.cucumber.listener.ExtentCucumberFormatter. It does not implement cucumber.api.Plugin "
  </code></pre>
  
  <p>My Error trace is as follows -:</p>
  
  <pre><code>cucumber.runtime.CucumberException: Couldn't load plugin class: com.cucumber.listener.ExtentCucumberFormatter. It does not implement cucumber.api.Plugin
      at cucumber.runtime.formatter.PluginFactory.loadClass(PluginFactory.java:179)
      at cucumber.runtime.formatter.PluginFactory.pluginClass(PluginFactory.java:166)
      at cucumber.runtime.formatter.PluginFactory.getPluginClass(PluginFactory.java:223)
      at cucumber.runtime.formatter.PluginFactory.isFormatterName(PluginFactory.java:201)
      at cucumber.runtime.RuntimeOptionsFactory.addPlugins(RuntimeOptionsFactory.java:94)
      at cucumber.runtime.RuntimeOptionsFactory.buildArgsFromOptions(RuntimeOptionsFactory.java:41)
      at cucumber.runtime.RuntimeOptionsFactory.create(RuntimeOptionsFactory.java:26)
      at cucumber.api.junit.Cucumber.&lt;init&gt;(Cucumber.java:74)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
      at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:87)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:73)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:46)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:522)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
  </code></pre>
  
  <p>My Pom.xml has following dependencies -:</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-java&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;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.12&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-testng&lt;/artifactId&gt;
              &lt;version&gt;2.3.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.beust&lt;/groupId&gt;
              &lt;artifactId&gt;jcommander&lt;/artifactId&gt;
              &lt;version&gt;1.27&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.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;6.13&lt;/version&gt;
              &lt;scope&gt;test&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.8.1&lt;/version&gt; &lt;/dependency&gt; 
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.vimalselvam&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-extentsreport&lt;/artifactId&gt;
              &lt;version&gt;3.0.0&lt;/version&gt;
          &lt;/dependency&gt;
  
  
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.aventstack&lt;/groupId&gt;
              &lt;artifactId&gt;extentreports&lt;/artifactId&gt;
              &lt;version&gt;3.1.3&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.relevantcodes&lt;/groupId&gt;
              &lt;artifactId&gt;extentreports&lt;/artifactId&gt;
              &lt;version&gt;2.41.2&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-jvm-deps&lt;/artifactId&gt;
              &lt;version&gt;1.0.3&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;gherkin&lt;/artifactId&gt;
              &lt;version&gt;2.7.3&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>My Runner class is as Follows -:</p>
  
  <pre><code>package com.cumberpr2.Runner;
  
  import java.io.File;
  
  import org.junit.AfterClass;
  import org.junit.BeforeClass;
  import org.junit.runner.RunWith;
  
  import com.cucumber.listener.ExtentProperties;
  import com.cucumber.listener.Reporter;
  
  import cucumber.api.CucumberOptions;
  import cucumber.api.junit.Cucumber;
  
  @RunWith(Cucumber.class)
  @CucumberOptions(features= {"src/test/java/com/cumberpr2/First/feature"},glue= {"com/cumberpr2/step"},
  monochrome=true,tags= {"@bvt,@sanity"},plugin={"com.cucumber.listener.ExtentCucumberFormatter:target/cucumber/report1.html"} 
  )
  //{"pretty","html:target/cucumber","com.cucumber.listener.ExtentCucumberFormatter"}
  public class Runner1 {
  
       @AfterClass
          public static void teardown() {
              Reporter.loadXMLConfig(new File("/src/test/java/com/cumberpr2/step/Extent-Config.xml"));
  
              Reporter.setSystemInfo("os", "windows OSX");
              Reporter.setTestRunnerOutput("Sample test runner output message");
          }
  
      /* @BeforeClass
       public static void setup() {
           ExtentProperties extentProperties = ExtentProperties.INSTANCE;
           extentProperties.setReportPath("output/myreport.html");
           extentProperties.setExtentXServerUrl("http://localhost:1337");
           extentProperties.setProjectName("MyProject");
       }*/
  
  
  }
  </code></pre>
  
  <p>My Folder structure is as follows -:  [1]: <a href="https://i.stack.imgur.com/ek06R.png" rel="nofollow noreferrer">https://i.stack.imgur.com/ek06R.png</a></p>
  
  <p>[enter image description here][1]</p>