7
Usage: java cucumber.api.cli.Main [options] [ [FILE|DIR][:LINE[:LINE]*] ]+

Options:

-g, --glue PATH                    Where glue code (step definitions and hooks) is loaded from.
-f, --format FORMAT[:PATH_OR_URL]  How to format results. Goes to STDOUT unless PATH_OR_URL is specified.
                                   Built-in FORMAT types: junit, html, pretty, progress, json.
                                   FORMAT can also be a fully qualified class name.
-t, --tags TAG_EXPRESSION          Only run scenarios tagged with tags matching TAG_EXPRESSION.
-n, --name REGEXP                  Only run scenarios whose names match REGEXP.
-d, --[no-]-dry-run                Skip execution of glue code.
-m, --[no-]-monochrome             Don't colour terminal output.
-s, --[no-]-strict                 Treat undefined and pending steps as errors.
    --snippets                     Snippet name: underscore, camelcase
    --dotcucumber PATH_OR_URL      Where to write out runtime information. PATH_OR_URL can be a file system
                                   path or a URL.
-v, --version                      Print version.
-h, --help                         You're looking at it.
Exception in thread "main" cucumber.runtime.CucumberException: Unknown option: --plugin
at cucumber.runtime.RuntimeOptions.parse(RuntimeOptions.java:119)

at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:50)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:44)
at cucumber.api.cli.Main.run(Main.java:20)
at cucumber.api.cli.Main.main(Main.java:16)

I am getting this error during running my feature file. PoM dependency is given below and I am using 3.2.4 Spring version with cucumber veriosn 1.1.5

Pankaj Kumar
  • 151
  • 1
  • 3
  • 9

3 Answers3

2

Looks like you are using a very old version of cucumber-jvm that is looking for

--format

instead of

--plugin

The latest cucumber-jvm usage text can be found here.

Get the latest cucumber-jvm from the Maven repository as described here or here.

MikeJRamsey56
  • 2,779
  • 1
  • 20
  • 34
0

Either its related with JAR library(ies) version mismatch or plugin(cucumber-eclipse-plugin) mismatch. look Here: https://groups.google.com/forum/#!topic/cukes/1urjr3ASq78

nityanarayan44
  • 378
  • 5
  • 10
0

I was also facing similar issue. The cucumber jars were old. So I updated it as below using maven repository

<properties>
        <cucumber.version>6.10.3</cucumber.version>
</properties>

<dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>${cucumber.version}</version>
        <scope>test</scope>
</dependency>

    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>${cucumber.version}</version>
        <scope>test</scope>
    </dependency>

NOTE: you can find the latest cucumber java in maven repository at this link Cucumber jars maven dependency

NehaG0406
  • 11
  • 4