You are running Cucumber from inside an executable jar file. This means that if you open the jar file you'll see something like this:
https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-executable-jar-format.html
example.jar
|
+-META-INF
| +-MANIFEST.MF
+-org
| +-springframework
| +-boot
| +-loader
| +-<spring boot loader classes>
+-BOOT-INF
+-classes
| +-mycompany
| +-project
| +-YourClasses.class
+-lib
+-dependency1.jar
+-dependency2.jar
Right now cucumber is scanning the entire class path for glue and feature files. This includes your dependencies in BOOT-INF/lib
. However Cucumber can't open these. Cucumber can however read the contents of BOOT-INF/classes
because that is mostly like a normal jar file.
So try passing --glue mycompany.project --features:classpath:mycompany/project
. This way Cucumber will only scan the contents ofBOOT-INF/classes
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…