[
http://jira.codehaus.org/browse/JBEHAVE-454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=261548#action_261548
]
Edward Staub commented on JBEHAVE-454:
--------------------------------------
Sorry.
Do you know that it works when configured correctly (however that is)?
Try this, it fails on my rig at least:
In the jbehave distribution directory
examples/gameoflife
{{{noformat}
# WORKS FINE
mvn integration-test
mvn clean
# move the stories to the test directory
mv src\main\java\com\lunivore\gameoflife\stories
src\test\java\com\lunivore\gameoflife
# FAILS
mvn integration-test
{noformat}}}
---------
Here's the relevant part of the console output. Note the classpath "urls=" on
the third line, which doesn't include the test directory, and the final line,
where it shows all the stories it found (none).
{{{noformat} [INFO] Running stories using embedder
Embedder[configuration=org.jbehave.core.configuration.MostUsefulConfiguration@bc9673,
candidateSteps=[],classLoader=EmbedderClassLoader[
urls=[/C:/v/jbehave/jbehave-distribution-3.2-src/jbehave-3.2/examples/gameoflife/target/classes/,
jbehave-core-3.2-SNAPSHOT.jar, commons-collections-3.2.1.jar,
commons-io-1.4.jar,
commons-lang-2.5.jar, plexus-utils-2.0.5.jar, freemarker-2.3.16.jar,
jbehave-ant-3.2-SNAPSHOT.jar, ant-1.7.1.jar, ant-launcher-1.7.1.jar,
xstream-1.3.1.jar, xpp3_min-1.1.4c.jar,
junit-dep-4.8.2.jar,
hamcrest-all-1.1.jar],parent=ClassRealm[plugin>org.jbehave:jbehave-maven-plugin:3.2-SNAPSHOT,
parent:
sun.misc.Launcher$AppClassLoader@11b86e7]],embedderControls=UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=true]],metaFilters=[null],systemProperties=},storyMapper=StoryMapper,storyRunner=StoryRunner,embedderMonitor=MavenEmbedderMonitor]
[INFO] Found class names: []{noformat}}}
-Ed
> Can't run-stories-as-embeddables from test directory using Maven plugin
> -----------------------------------------------------------------------
>
> Key: JBEHAVE-454
> URL: http://jira.codehaus.org/browse/JBEHAVE-454
> Project: JBehave
> Issue Type: Bug
> Components: Maven Plugin
> Affects Versions: 3.1.2
> Reporter: Edward Staub
>
> When I tried to use it, the plugin couldn't find my .java file.
> I suspect that this is because the classloader obtained under Maven with a
> story that uses
> new LoadFromClasspath(this.getClass().getClassLoader())
> as a StoryLoader doesn't include the test class directory - even though the
> running class is IN the test class directory. The same code works correctly
> under the Eclipse debugger (including the test class directory in the
> classpath). Everything else works correctly in Maven - unit tests, etc.
> The configuration:
> <configuration>
>
> <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
>
> <testSourceDirectory>${project.build.testSourceDirectory}</testSourceDirectory>
> <includes>
> <include>**/ProcessorTestStory.java</include>
> </includes>
> <metaFilters>
> <metaFilter>+author *</metaFilter>
> <metaFilter>-skip</metaFilter>
> </metaFilters>
> <systemProperties>
> <property>
> <name>java.awt.headless</name>
> <value>true</value>
> </property>
> </systemProperties>
>
> <ignoreFailureInStories>true</ignoreFailureInStories>
> <ignoreFailureInView>false</ignoreFailureInView>
> </configuration>
> -Ed
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email