'Cucumber classpath cannot find feature in IntelliJ

I have a Cucumber project in Java 8 and JUnit 4. I configure feature path like that in my Cucumber Options :

classpath:src/test/resources/features

I do a jar file and I execute it without any problem.

When I try to launch it directly in IntelliJ I have a error message :

No feature found in classpath:src/test/resources/features

If I remove classpath: from feature path it works in IntelliJ but it didn't work with my jar file

What I need to do, to have both case working (in jar and in IntelliJ) ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source