NoClassDefFoundError: gherkin/IGherkinDIalectProvider

前提是你 提交于 2020-01-16 09:04:25

问题


I created a simple cucumber test that returns a sequence number. The project builds successfully. I am using the Intellij IDE. When I try to run the cucumber test, I get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: gherkin/IGherkinDialectProvider at cucumber.api.cli.Main.run(Main.java:30) at cucumber.api.cli.Main.main(Main.java:18) ....

This is a gradle build and I have these dependencies listed below:

testCompile('io.cucumber:cucumber-java8:3.0.2')
    testCompile('io.cucumber:cucumber-junit:3.0.2')
    testCompile('io.cucumber:cucumber-spring:3.0.2')
    testCompile('io.cucumber:cucumber-jvm:3.0.2')

In other posts, it states to remove transitive dependencies, such as the cucumber-java, junit and jvm but I still get the error. I also tried adding gherkin: `io.cucumber:gherkin:3.2.0 but it gives the same error.

I found a table referring to the version of gherkin that goes with cucumber and for cucumber 3x there is no gherkin version to add.

So I am at a loss as to way I am getting this error.

来源:https://stackoverflow.com/questions/57826925/noclassdeffounderror-gherkin-igherkindialectprovider

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!