Project doesn't recognize cucumber-picocontainer dependency

假如想象 提交于 2019-12-04 14:08:23

I faced similiar issue.

The problem was in the version of the info cukes..You need to have the same version of all cucumber-* in your pom.xml. That solved the issue for me.

Add below dependency to your pom.xml

<dependency>   
    <groupId>org.picocontainer</groupId>  
    <artifactId>picocontainer</artifactId>
    <version>2.14.3</version>
</dependency>

Do not include

<dependency>   
    <groupId>info.cukes</groupId>  
    <artifactId>cucumber-java</artifactId>
    <version>1.2.2</version>
    <scope>test</scope>
</dependency>

in addition to cucumber-junit and cucumber-picocontainer.

That was the problem on my project.

Adding the following dependency worked for me,

    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>1.2.5</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>1.2.5</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-picocontainer</artifactId>
        <version>1.2.5</version>
        <scope>test</scope>
    </dependency>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!