JBehave
  1. JBehave
  2. JBEHAVE-277

Reports are outputted to $ANT_HOME/lib instead of target dir

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5, 2.5.1
    • Fix Version/s: 2.5.2
    • Component/s: Ant Tasks
    • Labels:
      None
    • Number of attachments :
      0

      Description

      As reported by Ben Sullivan, when running scenarios via Ant CLI, the reports are being outputted to $ANT_HOME/lib instead of target dir.

      Problem stems from the fact that the FilePrintStreamFactory uses the

      scenarioClass.getProtectionDomain().getCodeSource().getLocation().getFile();

      to identify the output dir. The classloading of Ant by default must be setting the code source location to $ANT_HOME/lib.

      Need to find a way to configure Ant classloading or allow explicit setting of the output directory (currently only the entire output file of the print stream is configurable, which makes it pretty useless for running with multiple scenarios).

        Activity

        Hide
        Mauro Talevi added a comment -

        Allowed configuration of output directory in builder to be absolute, so it can bypass the class source code location.
        Updated the TraderScenario configuration to use the absolute directory.
        The Ant build.xml in the trader example has been used to verify the ability to run scenario reports and render them.

        Show
        Mauro Talevi added a comment - Allowed configuration of output directory in builder to be absolute, so it can bypass the class source code location. Updated the TraderScenario configuration to use the absolute directory. The Ant build.xml in the trader example has been used to verify the ability to run scenario reports and render them.
        Hide
        Mauro Talevi added a comment -

        The ScenarioReporterBuilder now requires explicit invocation of withDefaultFormats() after the setting of the output*() methods to pick up the overridden output specification.

        Show
        Mauro Talevi added a comment - The ScenarioReporterBuilder now requires explicit invocation of withDefaultFormats() after the setting of the output*() methods to pick up the overridden output specification.
        Mauro Talevi made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            Mauro Talevi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: