title: JBehave Stories will not run as Embeddables
body: <p>I have been attempting to run concurrent, multi-threaded stories using JBehave. They run correctly when using the embedder, but when running them as embeddables, they don't execute. When I change the source directories or the scope, I get a nullpointerException and when I comment them out, it builds successfully but does not find the class "My-ProgramStories.java." When I execute them using Maven with "mvn clean verify" this is what is returning (sorry for the ugly formatting):</p>
  
  <blockquote>
    <p>[INFO] --- jbehave-maven-plugin:3.7.5:run-stories-as-embeddables (embeddable-stories) @  program-test> ---<br>
    [INFO] Running stories as embeddables using embedder
    Embedder[storyMapper=StoryMapper,storyRunner=StoryRunner,
    embedderMonitor=MavenEmbedderMonitor,classLoader=EmbedderClassLoader[urls=[/Users//Documents/Repositories///target/test-classes/,
    /Users//Documents/Repositories///target/classes,
    groovy-all-1.8.4.jar],parent=ClassRealm[plugin>org.jbehave:jbehave-maven-plugin:3.7.5,
    parent: sun.misc.Launcher$AppClassLoader@1729854]],embedderControls=
    UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories
    true,ignoreFailureInStories=true,ignoreFailureInView=true,verboseFailures=false,
    verboseFiltering=false,storyTimeoutInSecs=400,threads=4]],
    embedderFailureStrategy=org.jbehave.core.embedder.Embedder$ThrowingRunningStoriesFailed@127c1
    ee,configuration=org.jbehave.core.configuration.MostUsefulConfiguration@10c56cbd,candidateSte
    s=[],stepsFactory=,metaFilters=[groovy: story_path ==~ /.*.story/],systemProperties
    {},executorService=,executorServiceCreated=false,storyManager=]<br>
    [INFO] ------------------------------------------------------------------------<br>
    [INFO] BUILD FAILURE<br>
    [INFO] ------------------------------------------------------------------------<br>
    [INFO] Total time: 1:04.710s<br>
    [INFO] Finished at: Mon Jul 29 09:55:43 CDT 2013<br>
    [INFO] Final Memory: 60M/123M<br>
    [INFO] ------------------------------------------------------------------------<br>
    [ERROR] Failed to execute goal org.jbehave:jbehave-maven-plugin:3.7.5:run-stories-as
    embeddables (embeddable-stories) on project : Failed to run stories as
    embeddables: NullPointerException -> [Help 1]</p>
  </blockquote>
  
  <p>This is how I have the JBehave Maven Plugin configured in the POM:</p>
  
  <pre><code>&lt;properties&gt;
     &lt;embeddables&gt;**/My-ProgramStories.java&lt;/embeddables&gt;
     &lt;ignore.failre.in.stories&gt;true&lt;/ignore.failre.in.stories&gt;
     &lt;meta.filter&gt;groovy: story_path ==~ /.*.story/&lt;/meta.filter&gt;
     &lt;threads&gt;4&lt;/threads&gt;
     &lt;story.timeout.in.secs&gt;400&lt;/story.timeout.in.secs&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>...</p>
  
  <pre><code>&lt;plugin&gt;
     &lt;groupId&gt;org.jbehave&lt;/groupId&gt;
        &lt;artifactId&gt;jbehave-maven-plugin&lt;/artifactId&gt;
           &lt;executions&gt;
              &lt;execution&gt;
                 &lt;id&gt;embeddable-stories&lt;/id&gt;
                    &lt;phase&gt;integration-test&lt;/phase&gt;
                       &lt;configuration&gt;
                          &lt;includes&gt;
                             &lt;include&gt;${embeddables}&lt;/include&gt;
                          &lt;/includes&gt;
                          &lt;excludes&gt;
                             &lt;exclude&gt;${exclude}&lt;/exclude&gt;
                          &lt;/excludes&gt;
                          &lt;scope&gt;test&lt;/scope&gt;
                          &lt;sourceDirectory&gt;src/test/java&lt;/sourceDirectory&gt;
                          &lt;testSourceDirectory&gt;src/test/resources&lt;/testSourceDirectory&gt;
                          &lt;skip&gt;${skip}&lt;/skip&gt;
                          &lt;batch&gt;false&lt;/batch&gt;
                          &lt;threads&gt;${threads}&lt;/threads&gt;
                          &lt;storyTimeoutInSecs&gt;${story.timeout.in.secs}&lt;/storyTimeoutInSecs&gt;
                          &lt;generateViewAfterStories&gt;true&lt;/generateViewAfterStories&gt;
                          &lt;ignoreFailureInStories&gt;
                             ${ignore.failre.in.stories}
                          &lt;/ignoreFailureInStories&gt;
                          &lt;ignoreFailureInView&gt;true&lt;/ignoreFailureInView&gt;
                          &lt;metaFilters&gt;
                             &lt;metaFilter&gt;${meta.filter}&lt;/metaFilter&gt;
                          &lt;/metaFilters&gt;
                       &lt;/configuration&gt;
                       &lt;goals&gt;
                          &lt;goal&gt;run-stories-as-embeddables&lt;/goal&gt;
                       &lt;/goals&gt;
                    &lt;/execution&gt;
                 &lt;/executions&gt;
     &lt;dependencies&gt;
        &lt;dependency&gt;
           &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
           &lt;artifactId&gt;groovy-all&lt;/artifactId&gt;
           &lt;version&gt;1.8.4&lt;/version&gt;
        &lt;/dependency&gt;
     &lt;/dependencies&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>The structure of my story and test classes along with my story files as viewed through Eclipse is the following:</p>
  
  <blockquote>
    <p>my-program-test<br>
    -->src/test/java<br>
    ---->package1<br>
    ------>My-ProgramSteps.java<br>
    ------>My-ProgramStories.java<br>
    -->src/test/resources<br>
    ---->package1<br>
    ------>Story Files  </p>
  </blockquote>
  
  <p>Here is the stacktrace of the error:</p>
  
  <blockquote>
    <p>[ERROR] Failed to execute goal org.jbehave:jbehave-maven-plugin:3.7.5:run-stories-as-embeddables (embeddable-stories) on project my-program: Failed to run stories as embeddables: NullPointerException -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jbehave:jbehave-maven-plugin:3.7.5:run-stories-as-embeddables (embeddable-stories) on project my-program-test: Failed to run stories as embeddables
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
    Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run stories as embeddables
        at org.jbehave.mojo.RunStoriesAsEmbeddables.execute(RunStoriesAsEmbeddables.java:20)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
    Caused by: java.lang.NullPointerException
        at org.codehaus.plexus.util.AbstractScanner.normalizePattern(AbstractScanner.java:327)
        at org.codehaus.plexus.util.AbstractScanner.setExcludes(AbstractScanner.java:314)
        at org.jbehave.core.io.StoryFinder.scanDirectory(StoryFinder.java:218)
        at org.jbehave.core.io.StoryFinder.scan(StoryFinder.java:205)
        at org.jbehave.core.io.StoryFinder.findClassNames(StoryFinder.java:61)
        at org.jbehave.mojo.AbstractEmbedderMojo.classNames(AbstractEmbedderMojo.java:302)
        at org.jbehave.mojo.RunStoriesAsEmbeddables.execute(RunStoriesAsEmbeddables.java:18)
        ... 21 more</p>
  </blockquote>