Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute Cucumber Spring Boot Packaged Jar from command line?

I am fairly new to cucumber-jvm world. Trying to package cucumber spring boot app as Jar. app runs fine from Eclipse. But when I package as executable jar it fails with Exception :

Exception in Main Thread, No backend Module found. Make sure that you have backend module on CLASSPATH. Kindly help. Thank you.

like image 712
shah Avatar asked Oct 28 '25 09:10

shah


1 Answers

From: https://github.com/cucumber/cucumber-jvm/issues/1320

SpringBoot uses a nested jar structure that requires the use of ApplicationContext.getResources to access it transparently. You'll have to create your own instance of the Cucumber runtime and provide it a class loader and resource loader that use the ApplicationContext.

like image 168
M.P. Korstanje Avatar answered Oct 31 '25 08:10

M.P. Korstanje