public final class SurefireHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
DUMP_FILE_DATE |
static java.lang.String |
DUMP_FILE_PREFIX |
static java.lang.String |
DUMP_FILENAME |
static java.lang.String |
DUMP_FILENAME_FORMATTER |
private static java.lang.String[] |
DUMP_FILES_PRINT |
static java.lang.String |
DUMPSTREAM_FILENAME |
static java.lang.String |
DUMPSTREAM_FILENAME_FORMATTER |
private static java.lang.String |
FORK_NUMBER_PLACEHOLDER
The placeholder that is replaced by the executing fork's running number.
|
private static int |
MAX_PATH_LENGTH_WINDOWS
The maximum path that does not require long path prefix on Windows.
See sun/nio/fs/WindowsPath in
OpenJDK
and MSDN article. |
private static java.lang.String |
THREAD_NUMBER_PLACEHOLDER
The placeholder that is replaced by the executing thread's running number.
|
| Modifier | Constructor and Description |
|---|---|
private |
SurefireHelper()
Do not instantiate.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<CommandLineOption> |
commandLineOptions(org.apache.maven.execution.MavenSession session,
PluginConsoleLogger log) |
private static java.lang.String |
createErrorMessage(SurefireReportParameters reportParameters,
RunResult result,
java.lang.Exception firstForkException) |
static java.lang.String |
escapeToPlatformPath(java.lang.String path)
Escape file path for Windows when the path is too long; otherwise returns
path. |
private static boolean |
failIfNoTests(SurefireReportParameters reportParameters) |
static java.lang.String[] |
getDumpFilesToPrint() |
private static boolean |
isFatal(java.lang.Exception firstForkException) |
static void |
logDebugOrCliShowErrors(java.lang.String s,
PluginConsoleLogger log,
java.util.Collection<CommandLineOption> cli) |
static java.io.File |
replaceForkThreadsInPath(java.io.File path,
int replacement) |
static java.lang.String |
replaceThreadNumberPlaceholders(java.lang.String argLine,
int threadNumber) |
static void |
reportExecution(SurefireReportParameters reportParameters,
RunResult result,
PluginConsoleLogger log,
java.lang.Exception firstForkException) |
private static void |
throwException(SurefireReportParameters reportParameters,
RunResult result,
java.lang.Exception firstForkException) |
private static final java.lang.String DUMP_FILE_DATE
public static final java.lang.String DUMP_FILE_PREFIX
public static final java.lang.String DUMP_FILENAME_FORMATTER
public static final java.lang.String DUMPSTREAM_FILENAME_FORMATTER
public static final java.lang.String DUMPSTREAM_FILENAME
public static final java.lang.String DUMP_FILENAME
private static final int MAX_PATH_LENGTH_WINDOWS
sun/nio/fs/WindowsPath in
OpenJDK
and MSDN article.
private static final java.lang.String[] DUMP_FILES_PRINT
private static final java.lang.String THREAD_NUMBER_PLACEHOLDER
private static final java.lang.String FORK_NUMBER_PLACEHOLDER
@Nonnull
public static java.lang.String replaceThreadNumberPlaceholders(@Nonnull
java.lang.String argLine,
int threadNumber)
public static java.io.File replaceForkThreadsInPath(java.io.File path,
int replacement)
public static java.lang.String[] getDumpFilesToPrint()
public static void reportExecution(SurefireReportParameters reportParameters, RunResult result, PluginConsoleLogger log, java.lang.Exception firstForkException) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionExceptionpublic static java.util.List<CommandLineOption> commandLineOptions(org.apache.maven.execution.MavenSession session, PluginConsoleLogger log)
public static void logDebugOrCliShowErrors(java.lang.String s,
PluginConsoleLogger log,
java.util.Collection<CommandLineOption> cli)
public static java.lang.String escapeToPlatformPath(java.lang.String path)
path.
\\?\ prefix for path with drive letter
or \\?\UNC\ for UNC path.path - source pathprivate static boolean failIfNoTests(SurefireReportParameters reportParameters)
private static boolean isFatal(java.lang.Exception firstForkException)
private static void throwException(SurefireReportParameters reportParameters, RunResult result, java.lang.Exception firstForkException) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionExceptionprivate static java.lang.String createErrorMessage(SurefireReportParameters reportParameters, RunResult result, java.lang.Exception firstForkException)