Find stories when running from jar with dependencies

Description

Hello !

I'm using a ETSY sample based project to run my JBehave stories with Selenium.

I created a JFrame based user interface to have a standalone runnable for people who run JBehave + Selenium tests.

My stories files are stored as following "project/src/main/resources/stories/*.story"

To find the story files when running from Maven or Eclipse debug this line works fine :

new StoryFinder().findPaths(codeLocationFromClass(this.getClass()).getFile(), asList("*/.story"), null).toArray(new String[0]);

But when running from the JAR file that does not work : for "codeLocationFromClass(this.getClass()).getFile()" I get : "/C:/Documents%20and%20Settings/lbp0527/Bureau/project/build/project-1.0-SNAPSHOT-jar-with-dependencies.jar!"

The JAR file contains at its root the "stories" folder with inside all my *.story files but I can't find a good way to retrieve this list from my UI.

Do someone knows a way to find story files within the built JAR ?

Maybe this is some "off topic" for the Jira, please tell me if and how to find my answer.

Thanks !

Assignee

Mauro Talevi

Reporter

Damien LG

Labels

None

Components

Fix versions

Priority

Major
Configure