Package org.apache.maven.plugin.surefire
Class SurefireHelper
- java.lang.Object
-
- org.apache.maven.plugin.surefire.SurefireHelper
-
public final class SurefireHelper extends java.lang.Object
Helper class for surefire plugins
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DUMP_FILE_PREFIX
static java.lang.String
DUMPSTREAM_FILENAME_FORMATTER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<org.apache.maven.surefire.cli.CommandLineOption>
commandLineOptions(org.apache.maven.execution.MavenSession session, PluginConsoleLogger log)
static java.lang.String
escapeToPlatformPath(java.lang.String path)
Escape file path for Windows when the path is too long; otherwise returnspath
.static java.lang.String[]
getDumpFilesToPrint()
static void
logDebugOrCliShowErrors(java.lang.String s, PluginConsoleLogger log, java.util.Collection<org.apache.maven.surefire.cli.CommandLineOption> cli)
static void
reportExecution(SurefireReportParameters reportParameters, org.apache.maven.surefire.suite.RunResult result, PluginConsoleLogger log, java.lang.Exception firstForkException)
-
-
-
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 returnspath
.
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
-
-