admin管理员组

文章数量:1196780

As mentioned in .4.0 cucumber compatibility is removed and once we upgraded karate-junit5 dependency version to latest 1.5.1 from 1.3.1, "Cucumber for Java" plugin stopped working in Intellij.

This is what in pom.xml of karate-core v1.3.1

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-java</artifactId>
    <version>1.2.5</version>
    <exclusions>
        <exclusion>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-html</artifactId>
        </exclusion>
        <exclusion>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-jvm-deps</artifactId>
        </exclusion>
        <exclusion>
            <groupId>info.cukes</groupId>
            <artifactId>gherkin</artifactId>
        </exclusion>
    </exclusions>
</dependency>

And i copied the above and updated the group ids and version of cucumber-java, added in my pom.xml

<dependency>
  <groupId>io.karatelabs</groupId>
  <artifactId>karate-junit5</artifactId>
  <version>1.5.1</version>
  <scope>test</scope>
 </dependency>
<dependency>
    <groupId>io.cucumber</groupId>
    <artifactId>cucumber-java</artifactId>
    <version>7.20.1</version>
    <exclusions>
        <exclusion>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-html</artifactId>
        </exclusion>
        <exclusion>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-jvm-deps</artifactId>
        </exclusion>
        <exclusion>
            <groupId>io.cucumber</groupId>
            <artifactId>gherkin</artifactId>
        </exclusion>
    </exclusions>
</dependency>

After adding this i started getting error:

Exception in thread "main" java.lang.NoClassDefFoundError: io/cucumber/gherkin/GherkinParser

So i removed the gherkin exclusion part and then ended up with error

(127:0): unexpected end of file, expected: #DocStringSeparator, #Other

This same feature file was working in karate 1.3.1 version with "cucumber for java" plugin We cannot pay for karate plugin license and if no other way to get cucumber plugin works, then for now we may need to go back to version < 1.4.0 Any one face this error and how you got the syntax highlighting and the run features back in intellij?

本文标签: intellij ideaKarate upgrading 14x or higher with cucumber supportStack Overflow