Hi all,

Good news : problem solved thx to Seth and Mauro.

Changing my storyPaths method to this did the trick :

return new
StoryFinder().findPaths(CodeLocations.codeLocationFromClass(this.getClass()).getFile(),
                Arrays.asList("**/*.story"), null);

I'm now able to run my stories from the root project.

Your help has been really much appreciated.

Regards,

Louis GUEYE.
@lgueye
http://deepintojee.worpress.com

2011/10/24 Seth Carter <[email protected]>

> Ah, I missed that you have your intended jbehave tests in a folder at the
> same level as the module you want to test.  The projects I deal with have
> the jbehave tests in module/src/jbehave-tests at the same level as main, in
> that way the relative path src/jbehave-tests is always on the classpath and
> always exists locally per module.  Some of my parent projects have 15-20
> different web services so I need to keep the tests branching/releasing with
> the module like that.
> Then as Mauro points out, I use the StoryFinder like this:
> @Override
>
> protected List<String> storyPaths() {
> return new StoryFinder().findPaths(
> codeLocationFromClass(this.getClass()).getFile(),
> asList("**/${story.matcher}"), null);
> }
>
> passing in the story.matcher at run time from maven.
> Perhaps you could use the build helper or resource plugin to add the
> acceptance-test dir as a resource when the module build occurs, if that
> doesn't work maybe try moving your tests into the webapp module where maven
> can find them automatically.
> Seth
> p.s. If you really want it separate you could try to set it up like
> checkstyle recommends for a global rules in multi module projects:
>
> http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html
>
>

Reply via email to