public abstract class AbstractSurefireMojo extends org.apache.maven.plugin.AbstractMojo implements SurefireExecutionParameters
Modifier and Type | Class and Description |
---|---|
(package private) class |
AbstractSurefireMojo.DynamicProviderInfo
Provides the Provider information for manually configured providers.
|
(package private) class |
AbstractSurefireMojo.JUnit3ProviderInfo |
(package private) class |
AbstractSurefireMojo.JUnit4ProviderInfo |
(package private) class |
AbstractSurefireMojo.JUnitCoreProviderInfo |
(package private) class |
AbstractSurefireMojo.JUnitPlatformProviderInfo |
(package private) class |
AbstractSurefireMojo.ProviderList |
(package private) class |
AbstractSurefireMojo.TestNgProviderInfo |
Modifier and Type | Field and Description |
---|---|
private java.lang.String[] |
additionalClasspathElements
Additional elements to be appended to the classpath.
|
private java.lang.String |
argLine
Arbitrary JVM options to set on the command line.
|
private org.apache.maven.artifact.factory.ArtifactFactory |
artifactFactory
Creates the artifact.
|
private org.apache.maven.artifact.resolver.ArtifactResolver |
artifactResolver
Resolves the artifacts needed.
|
protected java.io.File |
basedir
The base directory of the project being tested.
|
private boolean |
childDelegation
When false it makes tests run using the standard classloader delegation instead of the default Maven isolated
classloader.
|
private java.lang.String[] |
classpathDependencyExcludes
List of dependencies to exclude from the test classpath.
|
private java.lang.String |
classpathDependencyScopeExclude
A dependency scope to exclude from the test classpath.
|
private java.util.List<CommandLineOption> |
cli |
private PluginConsoleLogger |
consoleLogger |
private java.lang.String[] |
dependenciesToScan
List of dependencies to scan for test classes to include in the test run.
|
private SurefireDependencyResolver |
dependencyResolver |
private boolean |
disableXmlReport
Flag to disable the generation of report files in xml format.
|
private int |
effectiveForkCount |
private boolean |
enableAssertions
By default, Surefire enables JVM assertions for the execution of your test cases.
|
private java.util.Map<java.lang.String,java.lang.String> |
environmentVariables
Additional environment variables to set on the command line.
|
private java.lang.String |
excludedGroups
(TestNG/JUnit47 provider with JUnit4.8+ only) Excluded groups.
|
private java.util.List<java.lang.String> |
excludes
A list of <exclude> elements specifying the tests (by pattern) that should be excluded in testing.
|
private java.lang.Boolean |
failIfNoTests
Set this to "true" to cause a failure if there are no tests to run.
|
private static java.lang.String |
FORK_ALWAYS |
private static java.lang.String |
FORK_NEVER |
static java.lang.String |
FORK_NUMBER_PLACEHOLDER
The placeholder that is replaced by the executing fork's running number.
|
private static java.lang.String |
FORK_ONCE |
private static java.lang.String |
FORK_PERTHREAD |
private java.lang.String |
forkCount
Option to specify the number of VMs to fork in parallel in order to execute the tests.
|
private java.lang.String |
forkMode
DEPRECATED since version 2.14.
|
private java.lang.String |
groups
(TestNG/JUnit47 provider with JUnit4.8+ only) Groups for this test.
|
private TestListResolver |
includedExcludedTests |
private static java.util.Map<java.lang.String,java.lang.String> |
JAVA_9_MATCHER |
private static java.util.Map<java.lang.String,java.lang.String> |
JAVA_9_MATCHER_OLD_NOTATION |
private java.lang.String |
junitArtifactName
Allows you to specify the name of the JUnit artifact.
|
private java.lang.String |
junitPlatformArtifactName
Allows you to specify the name of the JUnit Platform artifact.
|
private java.lang.String |
jvm
Option to specify the jvm (or path to the java executable) to use with the forking options.
|
private org.apache.maven.artifact.repository.ArtifactRepository |
localRepository
ArtifactRepository of the localRepository.
|
private org.codehaus.plexus.logging.Logger |
logger |
private org.apache.maven.artifact.metadata.ArtifactMetadataSource |
metadataSource
For retrieval of artifact's metadata.
|
private java.lang.String |
objectFactory
(TestNG only) Define the factory class used to create all test instances.
|
private java.lang.String |
parallel
(TestNG provider) When you use the parameter
parallel , TestNG will try to run all your test methods
in separate threads, except for methods that depend on each other, which will be run in the same thread in order
to respect their order of execution. |
private java.lang.Boolean |
parallelMavenExecution |
private boolean |
parallelOptimized
(JUnit 4.7 / provider only) The thread counts do not exceed the number of parallel suite, class runners and
average number of methods per class if set to true.
|
private boolean |
perCoreThreadCount
(JUnit 4.7 provider) Indicates that threadCount, threadCountSuites, threadCountClasses, threadCountMethods
are per cpu core.
|
private static Platform |
PLATFORM |
private java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> |
pluginArtifactMap
Map of plugin artifacts.
|
private org.apache.maven.plugin.descriptor.PluginDescriptor |
pluginDescriptor
Information about this plugin, mainly used to lookup this plugin's configuration from the currently executing
project.
|
private org.apache.maven.project.MavenProject |
project
The Maven Project Object.
|
private java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> |
projectArtifactMap
Map of project artifacts.
|
private java.io.File |
projectBuildDirectory
Read-only parameter with value of Maven property project.build.directory.
|
private java.util.Properties |
properties
List of properties for configuring all TestNG related configurations.
|
private ProviderDetector |
providerDetector |
private boolean |
redirectTestOutputToFile
Set this to "true" to redirect the unit test standard output to a file (found in
reportsDirectory/testName-output.txt).
|
private java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> |
remoteRepositories
The remote plugin repositories declared in the POM.
|
private java.lang.String |
reportNameSuffix
Add custom text into report filename: TEST-testClassName-reportNameSuffix.xml,
testClassName-reportNameSuffix.txt and testClassName-reportNameSuffix-output.txt.
|
private boolean |
reuseForks
Indicates if forked VMs can be reused.
|
private org.apache.maven.execution.MavenSession |
session
The current build session instance.
|
protected boolean |
skip
Set this to "true" to bypass unit tests entirely.
|
protected boolean |
skipExec
Deprecated.
Use skipTests instead.
|
protected boolean |
skipTests
Set this to "true" to skip running tests, but still compile them.
|
private TestListResolver |
specificTests |
private org.apache.maven.artifact.Artifact |
surefireBooterArtifact |
private static java.io.File |
SYSTEM_TMP_DIR |
private java.util.Properties |
systemProperties
Deprecated.
Use systemPropertyVariables instead.
|
private java.io.File |
systemPropertiesFile
List of System properties, loaded from a file, to pass to the JUnit tests.
|
private java.util.Map<java.lang.String,java.lang.String> |
systemPropertyVariables
List of System properties to pass to the JUnit tests.
|
private java.lang.String |
tempDir
Relative path to temporary-surefire-boot directory containing internal Surefire temporary files.
|
protected java.io.File |
testClassesDirectory
The directory containing generated test classes of the project being tested.
|
private java.lang.String |
testNGArtifactName
Allows you to specify the name of the TestNG artifact.
|
private java.io.File |
testSourceDirectory
The test source directory containing test class sources.
|
static java.lang.String |
THREAD_NUMBER_PLACEHOLDER
The placeholder that is replaced by the executing thread's running number.
|
private int |
threadCount
(TestNG/JUnit 4.7 provider) The attribute thread-count allows you to specify how many threads should be
allocated for this execution.
|
private int |
threadCountClasses
(JUnit 4.7 provider) This attribute allows you to specify the concurrency in test classes, i.e.:
number of concurrent classes if
threadCount is 0 or unspecified
limited classes concurrency if useUnlimitedThreads is set to true
if threadCount and certain thread-count parameters are > 0 for parallel , the
concurrency is computed from ratio. |
private int |
threadCountMethods
(JUnit 4.7 provider) This attribute allows you to specify the concurrency in test methods, i.e.:
number of concurrent methods if
threadCount is 0 or unspecified
limited concurrency of methods if useUnlimitedThreads is set to true
if threadCount and certain thread-count parameters are > 0 for parallel , the
concurrency is computed from ratio. |
private int |
threadCountSuites
(JUnit 4.7 provider) This attribute allows you to specify the concurrency in test suites, i.e.:
number of concurrent suites if
threadCount is 0 or unspecified
limited suites concurrency if useUnlimitedThreads is set to true
if threadCount and certain thread-count parameters are > 0 for parallel , the
concurrency is computed from ratio. |
private org.apache.maven.toolchain.Toolchain |
toolchain |
private org.apache.maven.toolchain.ToolchainManager |
toolchainManager |
private boolean |
trimStackTrace
Whether to trim the stack trace in the reports to just the lines within the test, or show the full trace.
|
private boolean |
useUnlimitedThreads
(JUnit 4.7 provider) Indicates that the thread pool will be unlimited.
|
private java.io.File |
workingDirectory
Command line working directory.
|
Constructor and Description |
---|
AbstractSurefireMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
addPluginSpecificChecksumItems(ChecksumCalculator checksum) |
private void |
addTestNgUtilsArtifacts(java.util.List<java.lang.String> classpath) |
private void |
checkMethodFilterInIncludesExcludes(java.lang.Iterable<java.lang.String> patterns) |
private void |
checkNonForkedThreads(java.lang.String parallel) |
private static void |
checkThreadCountEntity(int count,
java.lang.String entity) |
protected void |
cleanupForkConfiguration(ForkConfiguration forkConfiguration) |
private java.util.List<CommandLineOption> |
commandLineOptions() |
private void |
convertDeprecatedForkMode() |
private void |
convertGroupParameters() |
private void |
convertJunitCoreParameters()
Converts old JUnit configuration parameters over to new properties based configuration
method.
|
private void |
convertTestNGParameters()
Converts old TestNG configuration parameters over to new properties based configuration
method.
|
protected int |
convertWithCoreCount(java.lang.String count) |
static SurefireProperties |
createCopyAndReplaceForkNumPlaceholder(SurefireProperties effectiveSystemProperties,
int threadNumber) |
private void |
createDependencyResolver() |
private ForkStarter |
createForkStarter(ProviderInfo provider,
ForkConfiguration forkConfiguration,
ClassLoaderConfiguration classLoaderConfiguration,
RunOrderParameters runOrderParameters,
ConsoleLogger log,
DefaultScanResult scanResult) |
private InPluginVMSurefireStarter |
createInprocessStarter(ProviderInfo provider,
ClassLoaderConfiguration classLoaderConfiguration,
RunOrderParameters runOrderParameters,
DefaultScanResult scanResult) |
private ProviderConfiguration |
createProviderConfiguration(RunOrderParameters runOrderParameters) |
protected java.util.List<ProviderInfo> |
createProviders() |
private StartupConfiguration |
createStartupConfiguration(ProviderInfo provider,
boolean isInprocess,
ClassLoaderConfiguration classLoaderConfiguration,
DefaultScanResult scanResult) |
(package private) java.io.File |
createSurefireBootDirectoryInBuild() |
(package private) java.io.File |
createSurefireBootDirectoryInTemp() |
(package private) static java.lang.String |
createTmpDirectoryNameWithJava7(java.lang.String directoryPrefix) |
(package private) static java.lang.Object |
createTmpDirectoryWithJava7(java.lang.String directoryPrefix)
Reflection call of java.nio.file.Files.createTempDirectory( "surefire" ).
|
private org.apache.maven.artifact.versioning.VersionRange |
createVersionRange() |
boolean |
effectiveIsEnableAssertions() |
private void |
ensureParallelRunningCompatibility() |
private void |
ensureThreadCountWithPerThread() |
private void |
ensureWorkingDirectoryExists() |
void |
execute() |
private void |
executeAfterPreconditionsChecked(DefaultScanResult scanResult) |
private RunResult |
executeProvider(ProviderInfo provider,
DefaultScanResult scanResult) |
private boolean |
existsModuleDescriptor() |
private static java.util.Set<org.apache.maven.artifact.Artifact> |
filterArtifacts(java.util.Set<org.apache.maven.artifact.Artifact> artifacts,
org.apache.maven.artifact.resolver.filter.ArtifactFilter filter)
Return a new set containing only the artifacts accepted by the given filter.
|
private java.util.List<java.lang.String> |
filterNulls(java.util.List<java.lang.String> toFilter) |
private Classpath |
generateTestClasspath()
Generate the test classpath.
|
java.lang.String[] |
getAdditionalClasspathElements() |
private org.apache.maven.artifact.Artifact |
getApiArtifact() |
java.lang.String |
getArgLine() |
private Classpath |
getArtifactClasspath(org.apache.maven.artifact.Artifact surefireArtifact) |
org.apache.maven.artifact.factory.ArtifactFactory |
getArtifactFactory() |
org.apache.maven.artifact.resolver.ArtifactResolver |
getArtifactResolver() |
protected ClassLoaderConfiguration |
getClassLoaderConfiguration() |
java.lang.String[] |
getClasspathDependencyExcludes() |
java.lang.String |
getClasspathDependencyScopeExclude() |
private org.apache.maven.artifact.Artifact |
getCommonArtifact() |
private java.lang.String |
getConfigChecksum()
Operates on raw plugin parameters, not the "effective" values.
|
private static java.lang.String |
getConfiguratorName(org.apache.maven.artifact.versioning.ArtifactVersion version,
PluginConsoleLogger log) |
protected PluginConsoleLogger |
getConsoleLogger() |
private java.lang.String |
getDefaultExcludes() |
protected abstract java.lang.String[] |
getDefaultIncludes() |
java.lang.String[] |
getDependenciesToScan() |
private java.lang.String |
getEffectiveDebugForkedProcess() |
private boolean |
getEffectiveFailIfNoTests() |
protected int |
getEffectiveForkCount() |
(package private) java.lang.String |
getEffectiveForkMode() |
private static java.lang.String |
getEffectiveForkMode(java.lang.String forkMode) |
private JdkAttributes |
getEffectiveJvm() |
java.util.Map<java.lang.String,java.lang.String> |
getEnvironmentVariables() |
java.lang.String |
getExcludedGroups() |
private java.util.List<java.lang.String> |
getExcludeList() |
java.util.List<java.lang.String> |
getExcludes() |
abstract java.io.File |
getExcludesFile() |
java.lang.Boolean |
getFailIfNoTests() |
private ForkConfiguration |
getForkConfiguration() |
java.lang.String |
getForkCount() |
java.lang.String |
getForkMode() |
java.lang.String |
getGroups() |
private TestListResolver |
getIncludedAndExcludedTests() |
private java.util.List<java.lang.String> |
getIncludeList() |
abstract java.util.List<java.lang.String> |
getIncludes() |
abstract java.io.File |
getIncludesFile() |
private org.apache.maven.artifact.Artifact |
getJunitArtifact() |
java.lang.String |
getJunitArtifactName() |
private org.apache.maven.artifact.Artifact |
getJunitDepArtifact() |
private org.apache.maven.artifact.Artifact |
getJunitPlatformArtifact() |
java.lang.String |
getJunitPlatformArtifactName() |
java.lang.String |
getJvm() |
org.apache.maven.artifact.repository.ArtifactRepository |
getLocalRepository() |
private java.lang.Object |
getLocationManager() |
org.apache.maven.artifact.metadata.ArtifactMetadataSource |
getMetadataSource() |
private java.io.File |
getModuleDescriptor() |
protected abstract org.apache.maven.artifact.Artifact |
getMojoArtifact() |
java.lang.String |
getObjectFactory() |
java.lang.String |
getParallel() |
boolean |
getPerCoreThreadCount() |
java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> |
getPluginArtifactMap() |
org.apache.maven.plugin.descriptor.PluginDescriptor |
getPluginDescriptor() |
protected abstract java.lang.String |
getPluginName() |
org.apache.maven.project.MavenProject |
getProject() |
java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> |
getProjectArtifactMap() |
java.io.File |
getProjectBuildDirectory() |
(package private) java.util.List<org.apache.maven.artifact.Artifact> |
getProjectTestArtifacts() |
private java.util.Properties |
getProperties() |
java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> |
getRemoteRepositories() |
java.lang.String |
getReportNameSuffix() |
protected abstract java.lang.String |
getReportSchemaLocation() |
protected abstract int |
getRerunFailingTestsCount() |
abstract java.lang.String |
getRunOrder() |
private java.util.List<RunOrder> |
getRunOrders() |
org.apache.maven.execution.MavenSession |
getSession() |
TestListResolver |
getSpecificTests() |
private StartupReportConfiguration |
getStartupReportConfiguration(java.lang.String configChecksum) |
java.io.File |
getStatisticsFile(java.lang.String configurationHash) |
abstract java.io.File[] |
getSuiteXmlFiles() |
private org.apache.maven.artifact.Artifact |
getSurefireBooterArtifact() |
(package private) java.io.File |
getSurefireTempDir()
Where surefire stores its own temp files
|
java.util.Properties |
getSystemProperties() |
java.io.File |
getSystemPropertiesFile() |
java.util.Map<java.lang.String,java.lang.String> |
getSystemPropertyVariables() |
java.lang.String |
getTempDir() |
private org.apache.maven.artifact.Artifact |
getTestNgArtifact() |
java.lang.String |
getTestNGArtifactName() |
java.io.File |
getTestSourceDirectory() |
int |
getThreadCount() |
int |
getThreadCountClasses() |
int |
getThreadCountMethods() |
int |
getThreadCountSuites() |
(package private) org.apache.maven.toolchain.Toolchain |
getToolchain() |
org.apache.maven.toolchain.ToolchainManager |
getToolchainManager() |
private java.util.Properties |
getUserProperties() |
boolean |
getUseUnlimitedThreads() |
java.io.File |
getWorkingDirectory() |
protected abstract void |
handleSummary(RunResult summary,
java.lang.Exception firstForkException) |
protected boolean |
hasExecutedBefore() |
protected abstract boolean |
hasSuiteXmlFiles() |
protected boolean |
isAnyConcurrencySelected() |
protected boolean |
isAnyGroupsSelected() |
private boolean |
isAnyJunit4(org.apache.maven.artifact.Artifact artifact) |
boolean |
isChildDelegation() |
boolean |
isDisableXmlReport() |
boolean |
isEnableAssertions() |
protected boolean |
isForking() |
private static boolean |
isForkModeNever(java.lang.String forkMode) |
private boolean |
isJunit47Compatible(org.apache.maven.artifact.Artifact artifact) |
boolean |
isMavenParallel() |
private boolean |
isNotForking() |
boolean |
isParallelOptimized() |
boolean |
isRedirectTestOutputToFile() |
boolean |
isReuseForks() |
protected abstract boolean |
isSkipExecution() |
private boolean |
isSpecificTestSpecified() |
boolean |
isTrimStackTrace() |
protected void |
logDebugOrCliShowErrors(java.lang.String s) |
protected void |
logReportsDirectory() |
private void |
maybeAppendList(java.util.List<java.lang.String> base,
java.util.List<java.lang.String> list) |
private StartupConfiguration |
newStartupConfigForModularClasspath(ClassLoaderConfiguration classLoaderConfiguration,
Classpath providerClasspath,
java.lang.String providerName,
java.io.File moduleDescriptor,
DefaultScanResult scanResult) |
private StartupConfiguration |
newStartupConfigForNonModularClasspath(ClassLoaderConfiguration classLoaderConfiguration,
Classpath providerClasspath,
Classpath inprocClasspath,
java.lang.String providerName) |
private boolean |
onlyThreadCount() |
private java.util.List<java.lang.String> |
readListFromFile(java.io.File file) |
private boolean |
requiresRunHistory() |
private org.apache.maven.artifact.resolver.ArtifactResolutionResult |
resolveArtifact(org.apache.maven.artifact.Artifact filteredArtifact,
org.apache.maven.artifact.Artifact providerArtifact) |
(package private) DefaultScanResult |
scanDependencies() |
private DefaultScanResult |
scanDirectories() |
private DefaultScanResult |
scanForTestClasses() |
void |
setAdditionalClasspathElements(java.lang.String[] additionalClasspathElements) |
void |
setArgLine(java.lang.String argLine) |
void |
setArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory) |
void |
setArtifactResolver(org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver) |
void |
setChildDelegation(boolean childDelegation) |
void |
setClasspathDependencyExcludes(java.lang.String[] classpathDependencyExcludes) |
void |
setClasspathDependencyScopeExclude(java.lang.String classpathDependencyScopeExclude) |
void |
setDependenciesToScan(java.lang.String[] dependenciesToScan) |
void |
setDisableXmlReport(boolean disableXmlReport) |
void |
setEnableAssertions(boolean enableAssertions) |
void |
setEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables) |
void |
setExcludedGroups(java.lang.String excludedGroups) |
void |
setExcludes(java.util.List<java.lang.String> excludes) |
void |
setFailIfNoTests(boolean failIfNoTests) |
void |
setForkMode(java.lang.String forkMode) |
void |
setGroups(java.lang.String groups) |
abstract void |
setIncludes(java.util.List<java.lang.String> includes) |
void |
setJunitArtifactName(java.lang.String junitArtifactName) |
void |
setJunitPlatformArtifactName(java.lang.String junitPlatformArtifactName) |
void |
setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository) |
void |
setMetadataSource(org.apache.maven.artifact.metadata.ArtifactMetadataSource metadataSource) |
void |
setObjectFactory(java.lang.String objectFactory) |
void |
setParallel(java.lang.String parallel) |
void |
setParallelOptimized(boolean parallelOptimized) |
void |
setPerCoreThreadCount(boolean perCoreThreadCount) |
void |
setPluginArtifactMap(java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> pluginArtifactMap) |
void |
setProject(org.apache.maven.project.MavenProject project) |
void |
setProjectArtifactMap(java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> projectArtifactMap) |
void |
setProjectBuildDirectory(java.io.File projectBuildDirectory) |
void |
setProperties(java.util.Properties properties) |
void |
setRedirectTestOutputToFile(boolean redirectTestOutputToFile) |
void |
setRemoteRepositories(java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories) |
void |
setReportNameSuffix(java.lang.String reportNameSuffix) |
abstract void |
setRunOrder(java.lang.String runOrder) |
void |
setSession(org.apache.maven.execution.MavenSession session) |
abstract void |
setSuiteXmlFiles(java.io.File[] suiteXmlFiles) |
void |
setSystemProperties(java.util.Properties systemProperties) |
void |
setSystemPropertiesFile(java.io.File systemPropertiesFile) |
void |
setSystemPropertyVariables(java.util.Map<java.lang.String,java.lang.String> systemPropertyVariables) |
void |
setTempDir(java.lang.String tempDir) |
void |
setTestNGArtifactName(java.lang.String testNGArtifactName) |
void |
setTestSourceDirectory(java.io.File testSourceDirectory) |
void |
setThreadCount(int threadCount) |
void |
setThreadCountClasses(int threadCountClasses) |
void |
setThreadCountMethods(int threadCountMethods) |
void |
setThreadCountSuites(int threadCountSuites) |
void |
setToolchainManager(org.apache.maven.toolchain.ToolchainManager toolchainManager) |
void |
setTrimStackTrace(boolean trimStackTrace) |
private SurefireProperties |
setupProperties() |
private void |
setupStuff() |
void |
setUseUnlimitedThreads(boolean useUnlimitedThreads) |
void |
setWorkingDirectory(java.io.File workingDirectory) |
private void |
showMap(java.util.Map<?,?> map,
java.lang.String setting) |
private void |
showToLog(SurefireProperties props,
ConsoleLogger log) |
protected abstract java.util.List<java.io.File> |
suiteXmlFiles()
Calls
getSuiteXmlFiles() as list . |
private java.util.Set<java.lang.Object> |
systemPropertiesMatchingArgLine(SurefireProperties result) |
private static java.util.Map<java.lang.String,java.lang.String> |
toStringProperties(java.util.Properties properties) |
(package private) boolean |
verifyParameters() |
private void |
warnIfDefunctGroupsCombinations() |
private void |
warnIfIllegalTempDir() |
private void |
warnIfNotApplicableSkipAfterFailureCount() |
private void |
warnIfRerunClashes() |
private void |
warnIfUselessUseSystemClassLoaderParameter() |
private void |
warnIfWrongShutdownValue() |
getLog, getPluginContext, setLog, setPluginContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBasedir, getClassesDirectory, getDebugForkedProcess, getEncoding, getFailIfNoSpecifiedTests, getForkedProcessExitTimeoutInSeconds, getForkedProcessTimeoutInSeconds, getParallelTestsTimeoutForcedInSeconds, getParallelTestsTimeoutInSeconds, getReportFormat, getReportsDirectory, getShutdown, getSkipAfterFailureCount, getTest, getTestClassesDirectory, isPrintSummary, isSkip, isSkipExec, isSkipTests, isUseFile, isUseManifestOnlyJar, isUseSystemClassLoader, setBasedir, setClassesDirectory, setDebugForkedProcess, setEncoding, setFailIfNoSpecifiedTests, setForkedProcessExitTimeoutInSeconds, setForkedProcessTimeoutInSeconds, setParallelTestsTimeoutForcedInSeconds, setParallelTestsTimeoutInSeconds, setPrintSummary, setReportFormat, setReportsDirectory, setSkip, setSkipExec, setSkipTests, setTest, setTestClassesDirectory, setUseFile, setUseManifestOnlyJar, setUseSystemClassLoader
private static final java.lang.String FORK_ONCE
private static final java.lang.String FORK_ALWAYS
private static final java.lang.String FORK_NEVER
private static final java.lang.String FORK_PERTHREAD
private static final java.util.Map<java.lang.String,java.lang.String> JAVA_9_MATCHER_OLD_NOTATION
private static final java.util.Map<java.lang.String,java.lang.String> JAVA_9_MATCHER
private static final Platform PLATFORM
private static final java.io.File SYSTEM_TMP_DIR
private final ProviderDetector providerDetector
@Parameter(defaultValue="${plugin}", readonly=true) private org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor
@Parameter(property="skipTests", defaultValue="false") protected boolean skipTests
@Deprecated @Parameter(property="maven.test.skip.exec") protected boolean skipExec
skipTests
, but bound to the old property "maven.test.skip.exec".@Parameter(property="maven.test.skip", defaultValue="false") protected boolean skip
skipTests
parameter instead.@Component private org.apache.maven.project.MavenProject project
@Parameter(defaultValue="${basedir}") protected java.io.File basedir
@Parameter(defaultValue="${project.build.testOutputDirectory}") protected java.io.File testClassesDirectory
@Parameter(property="maven.test.dependency.excludes") private java.lang.String[] classpathDependencyExcludes
@Parameter(defaultValue="") private java.lang.String classpathDependencyScopeExclude
@Parameter(property="maven.test.additionalClasspath") private java.lang.String[] additionalClasspathElements
@Parameter(defaultValue="${project.build.testSourceDirectory}", required=true) private java.io.File testSourceDirectory
@Parameter private java.util.List<java.lang.String> excludes
test
parameter is not specified, the default excludes will be
<excludes>
<exclude>** /*$* </exclude>
</excludes>
(which excludes all inner classes).
suiteXmlFiles
parameter is specified.
<exclude>%regex[pkg.*Slow.*.class], Unstable* </exclude>
testClassesDirectory
which defaults
to the POM property ${project.build.testOutputDirectory}
, typically
src/test/java
unless overridden.@Parameter(defaultValue="${localRepository}", required=true, readonly=true) private org.apache.maven.artifact.repository.ArtifactRepository localRepository
@Deprecated @Parameter private java.util.Properties systemProperties
@Parameter private java.util.Map<java.lang.String,java.lang.String> systemPropertyVariables
@Parameter private java.io.File systemPropertiesFile
@Parameter private java.util.Properties properties
@Parameter(property="plugin.artifactMap", required=true, readonly=true) private java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> pluginArtifactMap
@Parameter(property="project.artifactMap", readonly=true, required=true) private java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> projectArtifactMap
@Parameter(property="surefire.reportNameSuffix", defaultValue="") private java.lang.String reportNameSuffix
@Parameter(property="maven.test.redirectTestOutputToFile", defaultValue="false") private boolean redirectTestOutputToFile
@Parameter(property="failIfNoTests") private java.lang.Boolean failIfNoTests
@Parameter(property="forkMode", defaultValue="once") private java.lang.String forkMode
forkCount
and reuseForks
instead.
never
, once
, always
, perthread
.none
and pertest
are also accepted for backwards compatibility.always
forks for each test-class.perthread
creates the number of parallel forks specified by threadCount
, where each forked
JVM is executing one test-class. See also the parameter reuseForks
for the lifetime of JVM.@Parameter(property="tempDir", defaultValue="surefire") private java.lang.String tempDir
java.io.tmpdir
on Windows (see SUREFIRE-1400).
@Parameter(property="jvm") private java.lang.String jvm
@Parameter(property="argLine") private java.lang.String argLine
argLine
, @{...} allows late replacement
of properties when the plugin is executed, so properties that have been modified by other plugins will be picked
up correctly.
See the Frequently Asked Questions page with more details:@Parameter private java.util.Map<java.lang.String,java.lang.String> environmentVariables
@Parameter(property="basedir") private java.io.File workingDirectory
@Parameter(property="childDelegation", defaultValue="false") private boolean childDelegation
forkMode
is not none
).@Parameter(property="groups") private java.lang.String groups
suiteXmlFiles
parameter is specified.@Category
annotation type is automatically inherited from
superclasses, see @java.lang.annotation.Inherited
. Make sure that test class inheritance still makes
sense together with @Category
annotation of the JUnit 4.12 or higher appeared in superclass.@Parameter(property="excludedGroups") private java.lang.String excludedGroups
suiteXmlFiles
parameter is specified.@Category
annotation type is automatically inherited from
superclasses, see @java.lang.annotation.Inherited
. Make sure that test class inheritance still makes
sense together with @Category
annotation of the JUnit 4.12 or higher appeared in superclass.@Parameter(property="junitArtifactName", defaultValue="junit:junit") private java.lang.String junitArtifactName
junit:junit
will be used.@Parameter(property="junitPlatformArtifactName", defaultValue="org.junit.platform:junit-platform-engine") private java.lang.String junitPlatformArtifactName
org.junit.platform:junit-platform-engine
will be used.@Parameter(property="testNGArtifactName", defaultValue="org.testng:testng") private java.lang.String testNGArtifactName
org.testng:testng
will be used.@Parameter(property="threadCount") private int threadCount
parallel
parameter.@Parameter(property="forkCount", defaultValue="1") private java.lang.String forkCount
argLine
of the forked processes may contain the place holder string
${surefire.forkNumber}
, which is replaced with a fixed number for each of the parallel forks,
ranging from 1 to the effective value of forkCount
times the maximum number of parallel
Surefire executions in maven parallel builds, i.e. the effective value of the -T command line
argument of maven core.@Parameter(property="reuseForks", defaultValue="true") private boolean reuseForks
forkCount
VMs will be forked and then reused to execute all tests.@Parameter(property="perCoreThreadCount", defaultValue="true") private boolean perCoreThreadCount
@Parameter(property="useUnlimitedThreads", defaultValue="false") private boolean useUnlimitedThreads
parallel
parameter and
the actual number of classes/methods will decide. Setting this to "true" effectively disables
perCoreThreadCount
and threadCount
. Defaults to "false".@Parameter(property="parallel") private java.lang.String parallel
parallel
, TestNG will try to run all your test methods
in separate threads, except for methods that depend on each other, which will be run in the same thread in order
to respect their order of execution.
classes
, methods
, both
to run
in separate threads been controlled by threadCount
.
both
is DEPRECATED.
Use classesAndMethods
instead.
suites
, suitesAndClasses
, suitesAndMethods
, classesAndMethods
, all
.@Parameter(property="parallelOptimized", defaultValue="true") private boolean parallelOptimized
@Parameter(property="threadCountSuites", defaultValue="0") private int threadCountSuites
threadCount
is 0 or unspecifieduseUnlimitedThreads
is set to truethreadCount
and certain thread-count parameters are > 0 for parallel
, the
concurrency is computed from ratio. For instance parallel=all
and the ratio between
threadCountSuites
:threadCountClasses
:threadCountMethods
is
2:3:5, there is 20% of threadCount
which appeared in concurrent suites.parallel
parameter.
The default value 0 behaves same as unspecified one.@Parameter(property="threadCountClasses", defaultValue="0") private int threadCountClasses
threadCount
is 0 or unspecifieduseUnlimitedThreads
is set to truethreadCount
and certain thread-count parameters are > 0 for parallel
, the
concurrency is computed from ratio. For instance parallel=all
and the ratio between
threadCountSuites
:threadCountClasses
:threadCountMethods
is
2:3:5, there is 30% of threadCount
in concurrent classes.parallel=suitesAndClasses
,
threadCount=16
, threadCountSuites=5
, threadCountClasses
is unspecified leaf, the number
of concurrent classes is varying from >= 11 to 14 or 15. The threadCountSuites
become
given number of threads.parallel
parameter.
The default value 0 behaves same as unspecified one.@Parameter(property="threadCountMethods", defaultValue="0") private int threadCountMethods
threadCount
is 0 or unspecifieduseUnlimitedThreads
is set to truethreadCount
and certain thread-count parameters are > 0 for parallel
, the
concurrency is computed from ratio. For instance parallel=all and the ratio between
threadCountSuites
:threadCountClasses
:threadCountMethods
is 2:3:5,
there is 50% of threadCount
which appears in concurrent methods.parallel=all
,
threadCount=16
, threadCountSuites=2
, threadCountClasses=3
, but threadCountMethods
is unspecified leaf, the number of concurrent methods is varying from >= 11 to 14 or 15.
The threadCountSuites
and threadCountClasses
become given number of threads.parallel
parameter. The default value 0
behaves same as unspecified one.@Parameter(property="trimStackTrace", defaultValue="true") private boolean trimStackTrace
@Component private org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
@Component private org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
@Parameter(defaultValue="${project.pluginArtifactRepositories}") private java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories
@Component private org.apache.maven.artifact.metadata.ArtifactMetadataSource metadataSource
@Parameter(property="disableXmlReport", defaultValue="false") private boolean disableXmlReport
@Parameter(property="enableAssertions", defaultValue="true") private boolean enableAssertions
@Component private org.apache.maven.execution.MavenSession session
@Component private org.codehaus.plexus.logging.Logger logger
@Parameter(property="objectFactory") private java.lang.String objectFactory
@Parameter(defaultValue="${session.parallel}", readonly=true) private java.lang.Boolean parallelMavenExecution
@Parameter(defaultValue="${project.build.directory}", readonly=true) private java.io.File projectBuildDirectory
@Parameter(property="dependenciesToScan") private java.lang.String[] dependenciesToScan
@Component private org.apache.maven.toolchain.ToolchainManager toolchainManager
private org.apache.maven.artifact.Artifact surefireBooterArtifact
private org.apache.maven.toolchain.Toolchain toolchain
private int effectiveForkCount
public static final java.lang.String THREAD_NUMBER_PLACEHOLDER
public static final java.lang.String FORK_NUMBER_PLACEHOLDER
private SurefireDependencyResolver dependencyResolver
private TestListResolver specificTests
private TestListResolver includedExcludedTests
private java.util.List<CommandLineOption> cli
private volatile PluginConsoleLogger consoleLogger
protected abstract java.lang.String getPluginName()
protected abstract int getRerunFailingTestsCount()
public abstract java.util.List<java.lang.String> getIncludes()
getIncludes
in interface SurefireExecutionParameters
public abstract java.io.File getIncludesFile()
public abstract void setIncludes(java.util.List<java.lang.String> includes)
setIncludes
in interface SurefireExecutionParameters
public abstract java.io.File getExcludesFile()
protected abstract java.util.List<java.io.File> suiteXmlFiles()
getSuiteXmlFiles()
as list
.
Never returns null.protected abstract boolean hasSuiteXmlFiles()
true
if suite-xml files array
is not empty.public abstract java.io.File[] getSuiteXmlFiles()
public abstract void setSuiteXmlFiles(java.io.File[] suiteXmlFiles)
public abstract java.lang.String getRunOrder()
public abstract void setRunOrder(java.lang.String runOrder)
protected abstract void handleSummary(RunResult summary, java.lang.Exception firstForkException) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected abstract boolean isSkipExecution()
protected abstract java.lang.String[] getDefaultIncludes()
protected abstract java.lang.String getReportSchemaLocation()
protected abstract org.apache.maven.artifact.Artifact getMojoArtifact()
private java.lang.String getDefaultExcludes()
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
execute
in interface org.apache.maven.plugin.Mojo
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
@Nonnull protected final PluginConsoleLogger getConsoleLogger()
private void setupStuff()
@Nonnull private DefaultScanResult scanForTestClasses() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private DefaultScanResult scanDirectories() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
java.util.List<org.apache.maven.artifact.Artifact> getProjectTestArtifacts()
DefaultScanResult scanDependencies() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
boolean verifyParameters() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
private void executeAfterPreconditionsChecked(@Nonnull DefaultScanResult scanResult) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
private void createDependencyResolver()
protected java.util.List<ProviderInfo> createProviders() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
private SurefireProperties setupProperties()
private java.util.Set<java.lang.Object> systemPropertiesMatchingArgLine(SurefireProperties result)
private void showToLog(SurefireProperties props, ConsoleLogger log)
@Nonnull private RunResult executeProvider(@Nonnull ProviderInfo provider, @Nonnull DefaultScanResult scanResult) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, SurefireExecutionException, SurefireBooterForkException, TestSetFailedException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
SurefireExecutionException
SurefireBooterForkException
TestSetFailedException
public static SurefireProperties createCopyAndReplaceForkNumPlaceholder(SurefireProperties effectiveSystemProperties, int threadNumber)
protected void cleanupForkConfiguration(ForkConfiguration forkConfiguration)
protected void logReportsDirectory()
final org.apache.maven.toolchain.Toolchain getToolchain()
private boolean existsModuleDescriptor()
private java.io.File getModuleDescriptor()
private void convertTestNGParameters() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private static java.lang.String getConfiguratorName(org.apache.maven.artifact.versioning.ArtifactVersion version, PluginConsoleLogger log) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void convertGroupParameters()
protected boolean isAnyConcurrencySelected()
protected boolean isAnyGroupsSelected()
private void convertJunitCoreParameters() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void checkNonForkedThreads(java.lang.String parallel) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private boolean onlyThreadCount()
private static void checkThreadCountEntity(int count, java.lang.String entity) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private boolean isJunit47Compatible(org.apache.maven.artifact.Artifact artifact)
private boolean isAnyJunit4(org.apache.maven.artifact.Artifact artifact)
private static boolean isForkModeNever(java.lang.String forkMode)
protected boolean isForking()
java.lang.String getEffectiveForkMode()
private java.util.List<RunOrder> getRunOrders()
private boolean requiresRunHistory()
private boolean getEffectiveFailIfNoTests()
private ProviderConfiguration createProviderConfiguration(RunOrderParameters runOrderParameters) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
private static java.util.Map<java.lang.String,java.lang.String> toStringProperties(java.util.Properties properties)
public java.io.File getStatisticsFile(java.lang.String configurationHash)
private StartupConfiguration createStartupConfiguration(@Nonnull ProviderInfo provider, boolean isInprocess, @Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull DefaultScanResult scanResult) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
private StartupConfiguration newStartupConfigForNonModularClasspath(@Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull Classpath providerClasspath, @Nonnull Classpath inprocClasspath, @Nonnull java.lang.String providerName) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, org.apache.maven.artifact.versioning.InvalidVersionSpecificationException, org.apache.maven.artifact.resolver.AbstractArtifactResolutionException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
org.apache.maven.artifact.resolver.AbstractArtifactResolutionException
private java.lang.Object getLocationManager()
private StartupConfiguration newStartupConfigForModularClasspath(@Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull Classpath providerClasspath, @Nonnull java.lang.String providerName, @Nonnull java.io.File moduleDescriptor, @Nonnull DefaultScanResult scanResult) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, org.apache.maven.artifact.versioning.InvalidVersionSpecificationException, org.apache.maven.artifact.resolver.AbstractArtifactResolutionException, java.io.IOException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
org.apache.maven.artifact.resolver.AbstractArtifactResolutionException
java.io.IOException
private org.apache.maven.artifact.Artifact getCommonArtifact()
private org.apache.maven.artifact.Artifact getApiArtifact()
private StartupReportConfiguration getStartupReportConfiguration(java.lang.String configChecksum)
private boolean isSpecificTestSpecified()
@Nonnull private java.util.List<java.lang.String> readListFromFile(@Nonnull java.io.File file)
private void maybeAppendList(java.util.List<java.lang.String> base, java.util.List<java.lang.String> list)
@Nonnull private java.util.List<java.lang.String> getExcludeList() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private java.util.List<java.lang.String> getIncludeList() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private void checkMethodFilterInIncludesExcludes(java.lang.Iterable<java.lang.String> patterns) throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private TestListResolver getIncludedAndExcludedTests() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
public TestListResolver getSpecificTests()
@Nonnull private java.util.List<java.lang.String> filterNulls(@Nonnull java.util.List<java.lang.String> toFilter)
private org.apache.maven.artifact.Artifact getTestNgArtifact() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private org.apache.maven.artifact.versioning.VersionRange createVersionRange()
private org.apache.maven.artifact.Artifact getJunitArtifact()
private org.apache.maven.artifact.Artifact getJunitDepArtifact()
private org.apache.maven.artifact.Artifact getJunitPlatformArtifact()
private ForkStarter createForkStarter(@Nonnull ProviderInfo provider, @Nonnull ForkConfiguration forkConfiguration, @Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull RunOrderParameters runOrderParameters, @Nonnull ConsoleLogger log, @Nonnull DefaultScanResult scanResult) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
private InPluginVMSurefireStarter createInprocessStarter(@Nonnull ProviderInfo provider, @Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull RunOrderParameters runOrderParameters, @Nonnull DefaultScanResult scanResult) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
@Nonnull private ForkConfiguration getForkConfiguration() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private void convertDeprecatedForkMode()
protected int getEffectiveForkCount()
protected int convertWithCoreCount(java.lang.String count)
private java.lang.String getEffectiveDebugForkedProcess()
private JdkAttributes getEffectiveJvm() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private org.apache.maven.artifact.Artifact getSurefireBooterArtifact()
java.io.File getSurefireTempDir()
private java.lang.String getConfigChecksum()
protected void addPluginSpecificChecksumItems(ChecksumCalculator checksum)
protected boolean hasExecutedBefore()
@Nonnull protected ClassLoaderConfiguration getClassLoaderConfiguration()
private Classpath generateTestClasspath() throws org.apache.maven.artifact.versioning.InvalidVersionSpecificationException, org.apache.maven.plugin.MojoFailureException, org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
- when it happensorg.apache.maven.plugin.MojoFailureException
- when it happensorg.apache.maven.artifact.resolver.ArtifactNotFoundException
- when it happensorg.apache.maven.artifact.resolver.ArtifactResolutionException
- when it happensorg.apache.maven.plugin.MojoExecutionException
private void addTestNgUtilsArtifacts(java.util.List<java.lang.String> classpath) throws org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException
org.apache.maven.artifact.resolver.ArtifactResolutionException
org.apache.maven.artifact.resolver.ArtifactNotFoundException
private static java.util.Set<org.apache.maven.artifact.Artifact> filterArtifacts(java.util.Set<org.apache.maven.artifact.Artifact> artifacts, org.apache.maven.artifact.resolver.filter.ArtifactFilter filter)
artifacts
- The unfiltered artifactsfilter
- The filter to applyprivate void showMap(java.util.Map<?,?> map, java.lang.String setting)
private org.apache.maven.artifact.resolver.ArtifactResolutionResult resolveArtifact(org.apache.maven.artifact.Artifact filteredArtifact, org.apache.maven.artifact.Artifact providerArtifact)
private Classpath getArtifactClasspath(org.apache.maven.artifact.Artifact surefireArtifact)
private java.util.Properties getUserProperties()
private void ensureWorkingDirectoryExists() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private void ensureParallelRunningCompatibility() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private void ensureThreadCountWithPerThread() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private void warnIfUselessUseSystemClassLoaderParameter()
private boolean isNotForking()
private java.util.List<CommandLineOption> commandLineOptions()
private void warnIfDefunctGroupsCombinations() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
private void warnIfRerunClashes() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private void warnIfWrongShutdownValue() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private void warnIfNotApplicableSkipAfterFailureCount() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private void warnIfIllegalTempDir() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
java.io.File createSurefireBootDirectoryInBuild()
java.io.File createSurefireBootDirectoryInTemp()
static java.lang.Object createTmpDirectoryWithJava7(java.lang.String directoryPrefix) throws java.io.IOException
java.io.IOException
static java.lang.String createTmpDirectoryNameWithJava7(java.lang.String directoryPrefix) throws java.io.IOException
java.io.IOException
public java.util.List<java.lang.String> getExcludes()
getExcludes
in interface SurefireExecutionParameters
public void setExcludes(java.util.List<java.lang.String> excludes)
setExcludes
in interface SurefireExecutionParameters
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
getLocalRepository
in interface SurefireExecutionParameters
public void setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
setLocalRepository
in interface SurefireExecutionParameters
public java.util.Properties getSystemProperties()
public void setSystemProperties(java.util.Properties systemProperties)
public java.util.Map<java.lang.String,java.lang.String> getSystemPropertyVariables()
public void setSystemPropertyVariables(java.util.Map<java.lang.String,java.lang.String> systemPropertyVariables)
public java.io.File getSystemPropertiesFile()
public void setSystemPropertiesFile(java.io.File systemPropertiesFile)
private java.util.Properties getProperties()
public void setProperties(java.util.Properties properties)
public java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> getPluginArtifactMap()
public void setPluginArtifactMap(java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> pluginArtifactMap)
public java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> getProjectArtifactMap()
public void setProjectArtifactMap(java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> projectArtifactMap)
public java.lang.String getReportNameSuffix()
public void setReportNameSuffix(java.lang.String reportNameSuffix)
public boolean isRedirectTestOutputToFile()
public void setRedirectTestOutputToFile(boolean redirectTestOutputToFile)
public java.lang.Boolean getFailIfNoTests()
public void setFailIfNoTests(boolean failIfNoTests)
public java.lang.String getForkMode()
public void setForkMode(java.lang.String forkMode)
public java.lang.String getJvm()
public java.lang.String getArgLine()
public void setArgLine(java.lang.String argLine)
public java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables()
public void setEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables)
public java.io.File getWorkingDirectory()
public void setWorkingDirectory(java.io.File workingDirectory)
public boolean isChildDelegation()
public void setChildDelegation(boolean childDelegation)
public java.lang.String getGroups()
public void setGroups(java.lang.String groups)
public java.lang.String getExcludedGroups()
public void setExcludedGroups(java.lang.String excludedGroups)
public java.lang.String getJunitArtifactName()
public void setJunitArtifactName(java.lang.String junitArtifactName)
public java.lang.String getJunitPlatformArtifactName()
public void setJunitPlatformArtifactName(java.lang.String junitPlatformArtifactName)
public java.lang.String getTestNGArtifactName()
public void setTestNGArtifactName(java.lang.String testNGArtifactName)
public int getThreadCount()
public void setThreadCount(int threadCount)
public boolean getPerCoreThreadCount()
public void setPerCoreThreadCount(boolean perCoreThreadCount)
public boolean getUseUnlimitedThreads()
public void setUseUnlimitedThreads(boolean useUnlimitedThreads)
public java.lang.String getParallel()
public void setParallel(java.lang.String parallel)
public boolean isParallelOptimized()
public void setParallelOptimized(boolean parallelOptimized)
public int getThreadCountSuites()
public void setThreadCountSuites(int threadCountSuites)
public int getThreadCountClasses()
public void setThreadCountClasses(int threadCountClasses)
public int getThreadCountMethods()
public void setThreadCountMethods(int threadCountMethods)
public boolean isTrimStackTrace()
public void setTrimStackTrace(boolean trimStackTrace)
public org.apache.maven.artifact.resolver.ArtifactResolver getArtifactResolver()
public void setArtifactResolver(org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver)
public org.apache.maven.artifact.factory.ArtifactFactory getArtifactFactory()
public void setArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory)
public java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepositories()
public void setRemoteRepositories(java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories)
public org.apache.maven.artifact.metadata.ArtifactMetadataSource getMetadataSource()
public void setMetadataSource(org.apache.maven.artifact.metadata.ArtifactMetadataSource metadataSource)
public boolean isDisableXmlReport()
public void setDisableXmlReport(boolean disableXmlReport)
public boolean isEnableAssertions()
public boolean effectiveIsEnableAssertions()
public void setEnableAssertions(boolean enableAssertions)
public org.apache.maven.execution.MavenSession getSession()
public void setSession(org.apache.maven.execution.MavenSession session)
public java.lang.String getObjectFactory()
public void setObjectFactory(java.lang.String objectFactory)
public org.apache.maven.toolchain.ToolchainManager getToolchainManager()
public void setToolchainManager(org.apache.maven.toolchain.ToolchainManager toolchainManager)
public boolean isMavenParallel()
public java.lang.String[] getDependenciesToScan()
public void setDependenciesToScan(java.lang.String[] dependenciesToScan)
public org.apache.maven.plugin.descriptor.PluginDescriptor getPluginDescriptor()
public org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject project)
public java.io.File getTestSourceDirectory()
getTestSourceDirectory
in interface SurefireExecutionParameters
public void setTestSourceDirectory(java.io.File testSourceDirectory)
setTestSourceDirectory
in interface SurefireExecutionParameters
public java.lang.String getForkCount()
public boolean isReuseForks()
public java.lang.String[] getAdditionalClasspathElements()
public void setAdditionalClasspathElements(java.lang.String[] additionalClasspathElements)
public java.lang.String[] getClasspathDependencyExcludes()
public void setClasspathDependencyExcludes(java.lang.String[] classpathDependencyExcludes)
public java.lang.String getClasspathDependencyScopeExclude()
public void setClasspathDependencyScopeExclude(java.lang.String classpathDependencyScopeExclude)
public java.io.File getProjectBuildDirectory()
public void setProjectBuildDirectory(java.io.File projectBuildDirectory)
protected void logDebugOrCliShowErrors(java.lang.String s)
public java.lang.String getTempDir()
public void setTempDir(java.lang.String tempDir)
private static java.lang.String getEffectiveForkMode(java.lang.String forkMode)