Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-610

Surefire plugin aborts if target directory contains files/dirs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.5
    • None
    • Maven Surefire Plugin
    • None
    • Windows XP, Windows 2003k, Ubuntu, Maven 2.0.9, Maven 2.2.1

    Description

      If there are files in the target directory when the plugin is run, specifically when tests are run inconjunction with the release:perform plugin goal, the plugin seems to simply terminate. The overall build is failed due to there being test failures, but the build shows no test failures (i.e. <<< FAILURE!) and none of the surefire reports list any test failures. It's important to note that there will be only part of your test reports you expect (say 50%) as the plugin appears to stop before it has executed all tests. I believe what occurs is the plugin tries to create a report, say for test G, and finds in the target directory that the reports files for test G already exist that's where it pukes. As a result, you will have reports for tests A-F and nothing more; all of these reports will NOT list any error/failure. Also important to note is that there is no summary you usually see, i.e. Tests: 100 Failures: 0 Errors: 0, after the surefire plugin runs - you only see the stats for the last test and then information from the "main" maven thread saying the build failed due to test failures.

      It would be ideal if:

      a) the surefire plugin could remove any surefire reports prior to execution

      or

      b) fail the build but provide a reason why, e.g. "could not write the test report for test G"

      Attachments

        Issue Links

          Activity

            People

              krosenvold Kristian Rosenvold
              rfidler Randall Fidler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: