Class SurefireHelper


  • public final class SurefireHelper
    extends java.lang.Object
    Helper class for surefire plugins
    • Field Detail

      • DUMP_FILE_PREFIX

        public static final java.lang.String DUMP_FILE_PREFIX
      • DUMPSTREAM_FILENAME_FORMATTER

        public static final java.lang.String DUMPSTREAM_FILENAME_FORMATTER
    • Method Detail

      • getDumpFilesToPrint

        public static java.lang.String[] getDumpFilesToPrint()
      • reportExecution

        public static void reportExecution​(SurefireReportParameters reportParameters,
                                           org.apache.maven.surefire.suite.RunResult result,
                                           PluginConsoleLogger log,
                                           java.lang.Exception firstForkException)
                                    throws org.apache.maven.plugin.MojoFailureException,
                                           org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoFailureException
        org.apache.maven.plugin.MojoExecutionException
      • commandLineOptions

        public static java.util.List<org.apache.maven.surefire.cli.CommandLineOption> commandLineOptions​(org.apache.maven.execution.MavenSession session,
                                                                                                         PluginConsoleLogger log)
      • logDebugOrCliShowErrors

        public static void logDebugOrCliShowErrors​(java.lang.String s,
                                                   PluginConsoleLogger log,
                                                   java.util.Collection<org.apache.maven.surefire.cli.CommandLineOption> cli)
      • escapeToPlatformPath

        public static java.lang.String escapeToPlatformPath​(java.lang.String path)
        Escape file path for Windows when the path is too long; otherwise returns path.
        See sun/nio/fs/WindowsPath for "long path" value explanation (=247), and MSDN article for detailed escaping strategy explanation: in short, \\?\ prefix for path with drive letter or \\?\UNC\ for UNC path.
        Parameters:
        path - source path
        Returns:
        escaped to platform path