Class ReportSourceLocator


  • public class ReportSourceLocator
    extends Object
    Determines the directory where the most recent PIT reports are actually located since the value of the timestamedReports parameter could impact where the reports are stored.
    Author:
    jasonmfehr
    • Constructor Detail

      • ReportSourceLocator

        public ReportSourceLocator()
    • Method Detail

      • locate

        public File locate​(File reportsDirectory,
                           org.apache.maven.plugin.logging.Log log)
        Determines the directory where the most recent PIT reports are located. If timestampedReports is set to true, then the latest reports directory is located and returned. If timestampedReports is set to false, then the provided reportsDirectory parameter is returned. If multiple runs of the plugin have resulted in a combination of a non-timestamped report directory and timestamped reports directories, then the latest of all those directories is returned. See TIMESTAMPED_REPORTS_FILE_FILTER for an explanation of what constitutes a timestamped reports directory;
        Parameters:
        reportsDirectory - File representing the directory where non-timestamped reports were written if the plugin's configuration has timestampedReports set to true;
        log - Log plugin logger for logging debug messages
        Returns:
        File representing the directory where the latest PIT reports are located