Details
-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 3.4.5
-
Fix Version/s: 3.5
-
Component/s: Ant Tasks, Maven Plugin
-
Labels:None
-
Number of attachments :
Description
The Maven plug-in does not configure a code location on the embedder's storyReportBuilder, therefore the story reporter will attempt to find story stats files in a directory relative to the current directory, and write the reports relative to the current directory as well.
Example project structure:
/ /app /app-stories
If the app-stories project uses the JUnit integration to run stories, its output files will correctly be written to /app-stories/target/jbehave.
A generate-stories-view mojo configured in app-stories/pom.xml will not find those output files and write the reports.html to the incorrect directory, unless the Maven build is started in the app-stories module directory.
For instance, in the root directory:
mvn verify -pl :app-stories
would search for story output files in /target/jbehave, not find anything, and write an empty reports.html to /target/jbehave/views.
Note that the unpack-view-resources mojo in the same pom.xml will work correctly, because it uses a different (and correct) way of configuring the output directory.
Suggestion:
Use the project.build.outputDirectory or project.build.testOutputDirectory properties to derive the story reporter builder code location from within the mojo.
Activity
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 3.5 [ 17393 ] |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Summary | Reporting mojos do not resolve output directory relative to project directory, but to relative to current directory | StoryReporterBuilder code location should be settable from the output directory by Ant tasks and Maven goals |
Issue Type | Bug [ 1 ] | Improvement [ 4 ] |
Component/s | Ant Tasks [ 11081 ] |
Patch suggested via Github: https://github.com/jbehave/jbehave-core/pull/18