Package org.apache.maven.plugin.surefire
Class SurefireHelper
java.lang.Object
org.apache.maven.plugin.surefire.SurefireHelper
Helper class for surefire plugins
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic List<CommandLineOption>
commandLineOptions
(org.apache.maven.execution.MavenSession session, PluginConsoleLogger log) static String
escapeToPlatformPath
(String path) Escape file path for Windows when the path is too long; otherwise returnspath
.static String[]
static void
static File
replaceForkThreadsInPath
(File path, int replacement) static String
replaceThreadNumberPlaceholders
(String argLine, int threadNumber) static void
reportExecution
(SurefireReportParameters reportParameters, RunResult result, PluginConsoleLogger log, Exception firstForkException)
-
Field Details
-
DUMP_FILE_PREFIX
-
DUMP_FILENAME_FORMATTER
-
DUMPSTREAM_FILENAME_FORMATTER
-
DUMPSTREAM_FILENAME
-
DUMP_FILENAME
-
EVENTS_BINARY_DUMP_FILENAME_FORMATTER
-
-
Method Details
-
replaceThreadNumberPlaceholders
-
replaceForkThreadsInPath
-
getDumpFilesToPrint
-
reportExecution
public static void reportExecution(SurefireReportParameters reportParameters, RunResult result, PluginConsoleLogger log, 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 List<CommandLineOption> commandLineOptions(org.apache.maven.execution.MavenSession session, PluginConsoleLogger log) -
logDebugOrCliShowErrors
public static void logDebugOrCliShowErrors(String s, PluginConsoleLogger log, Collection<CommandLineOption> cli) -
escapeToPlatformPath
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
-