Package org.apache.maven.plugin.surefire
Class AbstractSurefireMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugin.surefire.AbstractSurefireMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
,SurefireExecutionParameters
- Direct Known Subclasses:
IntegrationTestMojo
,SurefirePlugin
public abstract class AbstractSurefireMojo extends org.apache.maven.plugin.AbstractMojo implements SurefireExecutionParameters
Abstract base class for running tests using Surefire.- Version:
- $Id: SurefirePlugin.java 945065 2010-05-17 10:26:22Z stephenc $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
AbstractSurefireMojo.ClasspathCache
(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
-
Field Summary
Fields Modifier and Type Field 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.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 AbstractSurefireMojo.ClasspathCache
classpathCache
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 SurefireConsoleOutputReporter
consoleOutputReporter
private java.lang.String[]
dependenciesToScan
List of dependencies to scan for test classes to include in the test run.private org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver
dependencyResolver
private boolean
disableXmlReport
Deprecated.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
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
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.languages.java.jpms.LocationManager
locationManager
private org.codehaus.plexus.logging.Logger
logger
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 parameterparallel
, 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
Parallel Maven Execution.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.List<org.apache.maven.artifact.repository.ArtifactRepository>
projectRemoteRepositories
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 org.apache.maven.repository.RepositorySystem
repositorySystem
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 SurefireStatelessTestsetInfoReporter
statelessTestsetInfoReporter
private SurefireStatelessReporter
statelessTestsetReporter
Note: use the legacy system property disableXmlReport set totrue
to disable the report.private org.apache.maven.artifact.Artifact
surefireBooterArtifact
private SurefireDependencyResolver
surefireDependencyResolver
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.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 ifthreadCount
is 0 or unspecified limited classes concurrency ifuseUnlimitedThreads
is set to true ifthreadCount
and certain thread-count parameters are > 0 forparallel
, 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 ifthreadCount
is 0 or unspecified limited concurrency of methods ifuseUnlimitedThreads
is set to true ifthreadCount
and certain thread-count parameters are > 0 forparallel
, 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 ifthreadCount
is 0 or unspecified limited suites concurrency ifuseUnlimitedThreads
is set to true ifthreadCount
and certain thread-count parameters are > 0 forparallel
, 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 Summary
Constructors Constructor Description AbstractSurefireMojo()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addPluginSpecificChecksumItems(ChecksumCalculator checksum)
private boolean
canExecuteProviderWithModularPath(Platform platform)
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 ForkConfiguration
createForkConfiguration(Platform platform)
private ForkStarter
createForkStarter(ProviderInfo provider, ForkConfiguration forkConfiguration, ClassLoaderConfiguration classLoaderConfiguration, RunOrderParameters runOrderParameters, ConsoleLogger log, DefaultScanResult scanResult, Platform platform, TestClassPath testClasspathWrapper)
private static Classpath
createInProcClasspath(Classpath providerClasspath, java.util.Set<org.apache.maven.artifact.Artifact> newArtifacts)
private InPluginVMSurefireStarter
createInprocessStarter(ProviderInfo provider, ClassLoaderConfiguration classLoaderConfig, RunOrderParameters runOrderParameters, DefaultScanResult scanResult, Platform platform, TestClassPath testClasspathWrapper)
private ProviderConfiguration
createProviderConfiguration(RunOrderParameters runOrderParameters)
protected java.util.List<ProviderInfo>
createProviders(TestClassPath testClasspath)
private StartupConfiguration
createStartupConfiguration(ProviderInfo provider, boolean isInprocess, ClassLoaderConfiguration classLoaderConfiguration, DefaultScanResult scanResult, Platform platform, TestClassPath testClasspathWrapper)
(package private) java.io.File
createSurefireBootDirectoryInBuild()
(package private) java.io.File
createSurefireBootDirectoryInTemp()
private org.apache.maven.artifact.versioning.VersionRange
createVersionRange()
boolean
effectiveIsEnableAssertions()
private void
ensureEnableProcessChecker()
private void
ensureParallelRunningCompatibility()
private void
ensureThreadCountWithPerThread()
private void
ensureWorkingDirectoryExists()
void
execute()
private void
executeAfterPreconditionsChecked(DefaultScanResult scanResult)
private RunResult
executeProvider(ProviderInfo provider, DefaultScanResult scanResult, TestClassPath testClasspathWrapper)
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 TestClassPath
generateTestClasspath()
Generates 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)
private org.apache.maven.artifact.Artifact
getBooterArtifact()
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()
org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver
getDependencyResolver()
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()
protected abstract java.lang.String
getEnableProcessChecker()
java.util.Map<java.lang.String,java.lang.String>
getEnvironmentVariables()
protected abstract java.lang.String[]
getExcludedEnvironmentVariables()
java.lang.String
getExcludedGroups()
private java.util.List<java.lang.String>
getExcludeList()
java.util.List<java.lang.String>
getExcludes()
abstract java.io.File
getExcludesFile()
private org.apache.maven.artifact.Artifact
getExtensionsArtifact()
java.lang.Boolean
getFailIfNoTests()
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
getJvm()
org.apache.maven.artifact.repository.ArtifactRepository
getLocalRepository()
private org.codehaus.plexus.languages.java.jpms.LocationManager
getLocationManager()
For testing purposes - Mockito.private org.apache.maven.artifact.Artifact
getLoggerApiArtifact()
private java.io.File
getModuleDescriptor()
protected org.apache.maven.artifact.Artifact
getMojoArtifact()
This plugin MOJO artifact.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()
java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>
getProjectRemoteRepositories()
(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()
org.apache.maven.repository.RepositorySystem
getRepositorySystem()
protected abstract int
getRerunFailingTestsCount()
abstract java.lang.String
getRunOrder()
private java.util.List<RunOrder>
getRunOrders()
org.apache.maven.execution.MavenSession
getSession()
private org.apache.maven.artifact.Artifact
getShadefireArtifact()
TestListResolver
getSpecificTests()
private StartupReportConfiguration
getStartupReportConfiguration(java.lang.String configChecksum, boolean isForkMode)
private java.io.File
getStatisticsFile(java.lang.String configurationHash)
abstract java.io.File[]
getSuiteXmlFiles()
(package private) java.io.File
getSurefireTempDir()
Where surefire stores its own temp filesjava.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()
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()
private static boolean
hasGroupArtifactId(java.lang.String groupId, java.lang.String artifactId, org.apache.maven.artifact.Artifact artifact)
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
newStartupConfigWithClasspath(ClassLoaderConfiguration classLoaderConfiguration, java.util.Set<org.apache.maven.artifact.Artifact> providerArtifacts, java.lang.String providerName, TestClassPath testClasspathWrapper)
private StartupConfiguration
newStartupConfigWithModularPath(ClassLoaderConfiguration classLoaderConfiguration, java.util.Set<org.apache.maven.artifact.Artifact> providerArtifacts, java.lang.String providerName, java.io.File moduleDescriptor, DefaultScanResult scanResult, java.lang.String javaHome, TestClassPath testClasspathWrapper)
private boolean
onlyThreadCount()
private java.util.List<java.lang.String>
readListFromFile(java.io.File file)
private boolean
requiresRunHistory()
private static java.util.Set<org.apache.maven.artifact.Artifact>
retainInProcArtifactsUnique(java.util.Set<org.apache.maven.artifact.Artifact> providerArtifacts, org.apache.maven.artifact.Artifact... inPluginArtifacts)
(package private) DefaultScanResult
scanDependencies()
private DefaultScanResult
scanDirectories()
private DefaultScanResult
scanForTestClasses()
void
setAdditionalClasspathElements(java.lang.String[] additionalClasspathElements)
void
setArgLine(java.lang.String argLine)
void
setChildDelegation(boolean childDelegation)
void
setClasspathDependencyExcludes(java.lang.String[] classpathDependencyExcludes)
void
setClasspathDependencyScopeExclude(java.lang.String classpathDependencyScopeExclude)
void
setDependenciesToScan(java.lang.String[] dependenciesToScan)
void
setDependencyResolver(org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver dependencyResolver)
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
setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
(package private) void
setLogger(org.codehaus.plexus.logging.Logger logger)
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)
(package private) void
setPluginDescriptor(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
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
setProjectRemoteRepositories(java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> projectRemoteRepositories)
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)
void
setRepositorySystem(org.apache.maven.repository.RepositorySystem repositorySystem)
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()
protected abstract void
setUseModulePath(boolean useModulePath)
void
setUseUnlimitedThreads(boolean useUnlimitedThreads)
void
setWorkingDirectory(java.io.File workingDirectory)
private <T> void
showArray(T[] array, java.lang.String setting)
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()
CallsgetSuiteXmlFiles()
aslist
.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)
protected abstract boolean
useModulePath()
(package private) boolean
verifyParameters()
private void
warnIfDefunctGroupsCombinations()
private void
warnIfIllegalTempDir()
private void
warnIfNotApplicableSkipAfterFailureCount()
private void
warnIfRerunClashes()
private void
warnIfUselessUseSystemClassLoaderParameter()
private void
warnIfWrongShutdownValue()
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.maven.plugin.surefire.SurefireExecutionParameters
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
-
-
-
-
Field Detail
-
FORK_ONCE
private static final java.lang.String FORK_ONCE
- See Also:
- Constant Field Values
-
FORK_ALWAYS
private static final java.lang.String FORK_ALWAYS
- See Also:
- Constant Field Values
-
FORK_NEVER
private static final java.lang.String FORK_NEVER
- See Also:
- Constant Field Values
-
FORK_PERTHREAD
private static final java.lang.String FORK_PERTHREAD
- See Also:
- Constant Field Values
-
JAVA_9_MATCHER_OLD_NOTATION
private static final java.util.Map<java.lang.String,java.lang.String> JAVA_9_MATCHER_OLD_NOTATION
-
JAVA_9_MATCHER
private static final java.util.Map<java.lang.String,java.lang.String> JAVA_9_MATCHER
-
PLATFORM
private static final Platform PLATFORM
-
providerDetector
private final ProviderDetector providerDetector
-
classpathCache
private final AbstractSurefireMojo.ClasspathCache classpathCache
-
statelessTestsetReporter
@Parameter private SurefireStatelessReporter statelessTestsetReporter
Note: use the legacy system property disableXmlReport set totrue
to disable the report.
-
consoleOutputReporter
@Parameter private SurefireConsoleOutputReporter consoleOutputReporter
-
statelessTestsetInfoReporter
@Parameter private SurefireStatelessTestsetInfoReporter statelessTestsetInfoReporter
-
pluginDescriptor
@Parameter(defaultValue="${plugin}", readonly=true, required=true) 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.- Since:
- 2.12
-
skipTests
@Parameter(property="skipTests", defaultValue="false") protected boolean skipTests
Set this to "true" to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion.
Failsafe plugin deprecated the parameterskipTests
and the parameter will be removed in Failsafe 3.0.0 as it is a source of conflicts between Failsafe and Surefire plugin.- Since:
- 2.4
-
skipExec
@Deprecated @Parameter(property="maven.test.skip.exec") protected boolean skipExec
Deprecated.Use skipTests instead.This old parameter is just likeskipTests
, but bound to the old property "maven.test.skip.exec".- Since:
- 2.3
-
skip
@Parameter(property="maven.test.skip", defaultValue="false") protected boolean skip
Set this to "true" to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you enable it using the "maven.test.skip" property, because maven.test.skip disables both running the tests and compiling the tests. Consider using theskipTests
parameter instead.
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject project
The Maven Project Object.
-
basedir
@Parameter(defaultValue="${basedir}", readonly=true, required=true) protected java.io.File basedir
The base directory of the project being tested. This can be obtained in your integration test via System.getProperty("basedir").
-
testClassesDirectory
@Parameter(defaultValue="${project.build.testOutputDirectory}") protected java.io.File testClassesDirectory
The directory containing generated test classes of the project being tested. This will be included at the beginning of the test classpath. *
-
classpathDependencyExcludes
@Parameter(property="maven.test.dependency.excludes") private java.lang.String[] classpathDependencyExcludes
List of dependencies to exclude from the test classpath. Each dependency string must follow the format groupId:artifactId. For example: org.acme:project-a- Since:
- 2.6
-
classpathDependencyScopeExclude
@Parameter(defaultValue="") private java.lang.String classpathDependencyScopeExclude
A dependency scope to exclude from the test classpath. The scope should be one of the scopes defined by org.apache.maven.artifact.Artifact. This includes the following:
- compile - system, provided, compile
- runtime - compile, runtime
- compile+runtime - system, provided, compile, runtime
- runtime+system - system, compile, runtime
- test - system, provided, compile, runtime, test
- Since:
- 2.6
-
additionalClasspathElements
@Parameter(property="maven.test.additionalClasspath") private java.lang.String[] additionalClasspathElements
Additional elements to be appended to the classpath.- Since:
- 2.4
-
testSourceDirectory
@Parameter(defaultValue="${project.build.testSourceDirectory}", required=true) private java.io.File testSourceDirectory
The test source directory containing test class sources.- Since:
- 2.2
-
excludes
@Parameter private java.util.List<java.lang.String> excludes
A list of <exclude> elements specifying the tests (by pattern) that should be excluded in testing. When not specified and when thetest
parameter is not specified, the default excludes will be
(which excludes all inner classes).<excludes> <exclude>**/*$*</exclude> </excludes>
This parameter is ignored if the TestNGsuiteXmlFiles
parameter is specified.
Each exclude item may also contain a comma-separated sub-list of items, which will be treated as multiple <exclude> entries.
Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG):<exclude>%regex[pkg.*Slow.*.class], Unstable*</exclude>
Notice that these values are relative to the directory containing generated test classes of the project being tested. This directory is declared by the parametertestClassesDirectory
which defaults to the POM property${project.build.testOutputDirectory}
, typicallysrc/test/java
unless overridden.
-
localRepository
@Parameter(defaultValue="${localRepository}", required=true, readonly=true) private org.apache.maven.artifact.repository.ArtifactRepository localRepository
ArtifactRepository of the localRepository. To obtain the directory of localRepository in unit tests use System.getProperty("localRepository").
-
systemProperties
@Deprecated @Parameter private java.util.Properties systemProperties
Deprecated.Use systemPropertyVariables instead.List of System properties to pass to the JUnit tests.
-
systemPropertyVariables
@Parameter private java.util.Map<java.lang.String,java.lang.String> systemPropertyVariables
List of System properties to pass to the JUnit tests.- Since:
- 2.5
-
systemPropertiesFile
@Parameter private java.io.File systemPropertiesFile
List of System properties, loaded from a file, to pass to the JUnit tests.- Since:
- 2.8.2
-
properties
@Parameter private java.util.Properties properties
List of properties for configuring all TestNG related configurations. This is the new preferred method of configuring TestNG.- Since:
- 2.4
-
pluginArtifactMap
@Parameter(property="plugin.artifactMap", required=true, readonly=true) private java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> pluginArtifactMap
Map of plugin artifacts.
-
projectArtifactMap
@Parameter(property="project.artifactMap", readonly=true, required=true) private java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> projectArtifactMap
Map of project artifacts.
-
reportNameSuffix
@Parameter(property="surefire.reportNameSuffix", defaultValue="") private java.lang.String reportNameSuffix
Add custom text into report filename: TEST-testClassName-reportNameSuffix.xml, testClassName-reportNameSuffix.txt and testClassName-reportNameSuffix-output.txt. File TEST-testClassName-reportNameSuffix.xml has changed attributes 'testsuite'--'name' and 'testcase'--'classname' - reportNameSuffix is added to the attribute value.
-
redirectTestOutputToFile
@Parameter(property="maven.test.redirectTestOutputToFile", defaultValue="false") private boolean redirectTestOutputToFile
Set this to "true" to redirect the unit test standard output to a file (found in reportsDirectory/testName-output.txt).- Since:
- 2.3
-
failIfNoTests
@Parameter(property="failIfNoTests") private java.lang.Boolean failIfNoTests
Set this to "true" to cause a failure if there are no tests to run. Defaults to "false".- Since:
- 2.4
-
forkMode
@Parameter(property="forkMode", defaultValue="once") private java.lang.String forkMode
DEPRECATED since version 2.14. UseforkCount
andreuseForks
instead.
Option to specify the forking mode. Can benever
,once
,always
,perthread
.
Thenone
andpertest
are also accepted for backwards compatibility.
Thealways
forks for each test-class.
Theperthread
creates the number of parallel forks specified bythreadCount
, where each forked JVM is executing one test-class. See also the parameterreuseForks
for the lifetime of JVM.- Since:
- 2.1
-
tempDir
@Parameter(property="tempDir", defaultValue="surefire") private java.lang.String tempDir
Relative path to temporary-surefire-boot directory containing internal Surefire temporary files.
The temporary-surefire-boot directory is project.build.directory on most platforms or system default temporary-directory specified by the system propertyjava.io.tmpdir
on Windows (see SUREFIRE-1400).
It is deleted after the test set has completed.- Since:
- 2.20
-
jvm
@Parameter(property="jvm") private java.lang.String jvm
Option to specify the jvm (or path to the java executable) to use with the forking options. For the default, the jvm will be a new instance of the same VM as the one used to run Maven. JVM settings are not inherited from MAVEN_OPTS.- Since:
- 2.1
-
argLine
@Parameter(property="argLine") private java.lang.String argLine
Arbitrary JVM options to set on the command line.
Since the Version 2.17 using an alternate syntax forargLine
, @{...} 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:
http://maven.apache.org/surefire/maven-surefire-plugin/faq.html
http://maven.apache.org/surefire/maven-failsafe-plugin/faq.html- Since:
- 2.1
-
environmentVariables
@Parameter private java.util.Map<java.lang.String,java.lang.String> environmentVariables
Additional environment variables to set on the command line.- Since:
- 2.1.3
-
workingDirectory
@Parameter(property="basedir") private java.io.File workingDirectory
Command line working directory.- Since:
- 2.1.3
-
childDelegation
@Parameter(property="childDelegation", defaultValue="false") private boolean childDelegation
When false it makes tests run using the standard classloader delegation instead of the default Maven isolated classloader. Only used when forking (forkMode
is notnone
).
Setting it to false helps with some problems caused by conflicts between xml parsers in the classpath and the Java 5 provider parser.- Since:
- 2.1
-
groups
@Parameter(property="groups") private java.lang.String groups
(TestNG/JUnit47 provider with JUnit4.8+ only) Groups for this test. Only classes/methods/etc decorated with one of the groups specified here will be included in test run, if specified.
For JUnit, this parameter forces the use of the 4.7 provider
This parameter is ignored if thesuiteXmlFiles
parameter is specified.
Since version 2.18.1 and JUnit 4.12, the@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.- Since:
- 2.2
-
excludedGroups
@Parameter(property="excludedGroups") private java.lang.String excludedGroups
(TestNG/JUnit47 provider with JUnit4.8+ only) Excluded groups. Any methods/classes/etc with one of the groups specified in this list will specifically not be run.
For JUnit, this parameter forces the use of the 4.7 provider.
This parameter is ignored if thesuiteXmlFiles
parameter is specified.
Since version 2.18.1 and JUnit 4.12, the@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.- Since:
- 2.2
-
junitArtifactName
@Parameter(property="junitArtifactName", defaultValue="junit:junit") private java.lang.String junitArtifactName
Allows you to specify the name of the JUnit artifact. If not set,junit:junit
will be used.- Since:
- 2.3.1
-
testNGArtifactName
@Parameter(property="testNGArtifactName", defaultValue="org.testng:testng") private java.lang.String testNGArtifactName
Allows you to specify the name of the TestNG artifact. If not set,org.testng:testng
will be used.- Since:
- 2.3.1
-
threadCount
@Parameter(property="threadCount") 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. Only makes sense to use in conjunction with theparallel
parameter.- Since:
- 2.2
-
forkCount
@Parameter(property="forkCount", defaultValue="1") private java.lang.String forkCount
Option to specify the number of VMs to fork in parallel in order to execute the tests. When terminated with "C", the number part is multiplied with the number of CPU cores. Floating point value are only accepted together with "C". If set to "0", no VM is forked and all tests are executed within the main process.
Example values: "1.5C", "4"
The system properties and theargLine
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 offorkCount
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.- Since:
- 2.14
-
reuseForks
@Parameter(property="reuseForks", defaultValue="true") private boolean reuseForks
Indicates if forked VMs can be reused. If set to "false", a new VM is forked for each test class to be executed. If set to "true", up toforkCount
VMs will be forked and then reused to execute all tests.- Since:
- 2.13
-
perCoreThreadCount
@Parameter(property="perCoreThreadCount", defaultValue="true") private boolean perCoreThreadCount
(JUnit 4.7 provider) Indicates that threadCount, threadCountSuites, threadCountClasses, threadCountMethods are per cpu core.- Since:
- 2.5
-
useUnlimitedThreads
@Parameter(property="useUnlimitedThreads", defaultValue="false") private boolean useUnlimitedThreads
(JUnit 4.7 provider) Indicates that the thread pool will be unlimited. Theparallel
parameter and the actual number of classes/methods will decide. Setting this to "true" effectively disablesperCoreThreadCount
andthreadCount
. Defaults to "false".- Since:
- 2.5
-
parallel
@Parameter(property="parallel") private java.lang.String parallel
(TestNG provider) When you use the parameterparallel
, 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.
(JUnit 4.7 provider) Supports valuesclasses
,methods
,both
to run in separate threads been controlled bythreadCount
.
Since version 2.16 (JUnit 4.7 provider), the valueboth
is DEPRECATED. UseclassesAndMethods
instead.
Since version 2.16 (JUnit 4.7 provider), additional vales are available:
suites
,suitesAndClasses
,suitesAndMethods
,classesAndMethods
,all
.
By default, Surefire does not execute tests in parallel. You can set the parameterparallel
tonone
to explicitly disable parallel execution (e.g. when disabling parallel execution in special Maven profiles when executing coverage analysis).- Since:
- 2.2
-
parallelOptimized
@Parameter(property="parallelOptimized", defaultValue="true") 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.
True by default.- Since:
- 2.17
-
threadCountSuites
@Parameter(property="threadCountSuites", defaultValue="0") 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 forparallel
, the concurrency is computed from ratio. For instanceparallel=all
and the ratio betweenthreadCountSuites
:threadCountClasses
:threadCountMethods
is 2:3:5, there is 20% ofthreadCount
which appeared in concurrent suites.
parallel
parameter. The default value 0 behaves same as unspecified one.- Since:
- 2.16
- number of concurrent suites if
-
threadCountClasses
@Parameter(property="threadCountClasses", defaultValue="0") 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 forparallel
, the concurrency is computed from ratio. For instanceparallel=all
and the ratio betweenthreadCountSuites
:threadCountClasses
:threadCountMethods
is 2:3:5, there is 30% ofthreadCount
in concurrent classes. - as in the previous case but without this leaf thread-count. Example:
parallel=suitesAndClasses
,threadCount=16
,threadCountSuites=5
,threadCountClasses
is unspecified leaf, the number of concurrent classes is varying from >= 11 to 14 or 15. ThethreadCountSuites
become given number of threads.
parallel
parameter. The default value 0 behaves same as unspecified one.- Since:
- 2.16
- number of concurrent classes if
-
threadCountMethods
@Parameter(property="threadCountMethods", defaultValue="0") 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 forparallel
, the concurrency is computed from ratio. For instance parallel=all and the ratio betweenthreadCountSuites
:threadCountClasses
:threadCountMethods
is 2:3:5, there is 50% ofthreadCount
which appears in concurrent methods. - as in the previous case but without this leaf thread-count. Example:
parallel=all
,threadCount=16
,threadCountSuites=2
,threadCountClasses=3
, butthreadCountMethods
is unspecified leaf, the number of concurrent methods is varying from >= 11 to 14 or 15. ThethreadCountSuites
andthreadCountClasses
become given number of threads.
parallel
parameter. The default value 0 behaves same as unspecified one.- Since:
- 2.16
- number of concurrent methods if
-
trimStackTrace
@Parameter(property="trimStackTrace", defaultValue="true") private boolean trimStackTrace
Whether to trim the stack trace in the reports to just the lines within the test, or show the full trace.- Since:
- 2.2
-
remoteRepositories
@Parameter(defaultValue="${project.pluginArtifactRepositories}", readonly=true, required=true) private java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories
The remote plugin repositories declared in the POM.- Since:
- 2.2
-
projectRemoteRepositories
@Parameter(defaultValue="${project.remoteArtifactRepositories}", required=true, readonly=true) private java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> projectRemoteRepositories
-
disableXmlReport
@Deprecated @Parameter(property="disableXmlReport", defaultValue="false") private boolean disableXmlReport
Deprecated.Flag to disable the generation of report files in xml format. Deprecated since 3.0.0-M4. Instead use disable withinstatelessTestsetReporter
since of 3.0.0-M6.- Since:
- 2.2
-
enableAssertions
@Parameter(property="enableAssertions", defaultValue="true") private boolean enableAssertions
By default, Surefire enables JVM assertions for the execution of your test cases. To disable the assertions, set this flag to "false".- Since:
- 2.3.1
-
session
@Parameter(defaultValue="${session}", required=true, readonly=true) private org.apache.maven.execution.MavenSession session
The current build session instance.
-
logger
@Component private org.codehaus.plexus.logging.Logger logger
-
objectFactory
@Parameter(property="objectFactory") private java.lang.String objectFactory
(TestNG only) Define the factory class used to create all test instances.- Since:
- 2.5
-
parallelMavenExecution
@Parameter(defaultValue="${session.parallel}", readonly=true) private java.lang.Boolean parallelMavenExecution
Parallel Maven Execution.
-
projectBuildDirectory
@Parameter(defaultValue="${project.build.directory}", readonly=true, required=true) private java.io.File projectBuildDirectory
Read-only parameter with value of Maven property project.build.directory.- Since:
- 2.20
-
dependenciesToScan
@Parameter(property="dependenciesToScan") private java.lang.String[] dependenciesToScan
List of dependencies to scan for test classes to include in the test run. The child elements of this element must be <dependency> elements, and the contents of each of these elements must be a string which follows the general form:groupId[:artifactId[:type[:classifier][:version]]]
The wildcard character
*
can be used within the sub parts of those composite identifiers to do glob-like pattern matching. The classifier may be omitted when matching dependencies without a classifier.Examples:
group
or, equivalently,group:*
g*p:*rtifac*
group:*:jar
group:artifact:*:1.0.0
(no classifier)group:*:test-jar:tests
*:artifact:*:*:1.0.0
Since version 2.22.0 you can scan for test classes from a project dependency of your multi-module project.
In versions before 3.0.0-M4, only
groupId:artifactId
is supported.- Since:
- 2.15
-
toolchainManager
@Component private org.apache.maven.toolchain.ToolchainManager toolchainManager
-
locationManager
@Component private org.codehaus.plexus.languages.java.jpms.LocationManager locationManager
-
repositorySystem
@Component private org.apache.maven.repository.RepositorySystem repositorySystem
-
dependencyResolver
@Component private org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver dependencyResolver
-
surefireBooterArtifact
private org.apache.maven.artifact.Artifact surefireBooterArtifact
-
toolchain
private org.apache.maven.toolchain.Toolchain toolchain
-
effectiveForkCount
private int effectiveForkCount
-
surefireDependencyResolver
private SurefireDependencyResolver surefireDependencyResolver
-
specificTests
private TestListResolver specificTests
-
includedExcludedTests
private TestListResolver includedExcludedTests
-
cli
private java.util.List<CommandLineOption> cli
-
consoleLogger
private volatile PluginConsoleLogger consoleLogger
-
-
Method Detail
-
getPluginName
protected abstract java.lang.String getPluginName()
-
getRerunFailingTestsCount
protected abstract int getRerunFailingTestsCount()
-
getIncludes
public abstract java.util.List<java.lang.String> getIncludes()
- Specified by:
getIncludes
in interfaceSurefireExecutionParameters
-
getIncludesFile
public abstract java.io.File getIncludesFile()
-
setIncludes
public abstract void setIncludes(java.util.List<java.lang.String> includes)
- Specified by:
setIncludes
in interfaceSurefireExecutionParameters
-
getExcludesFile
public abstract java.io.File getExcludesFile()
-
suiteXmlFiles
protected abstract java.util.List<java.io.File> suiteXmlFiles()
CallsgetSuiteXmlFiles()
aslist
. Never returns null.- Returns:
- list of TestNG suite XML files provided by MOJO
-
hasSuiteXmlFiles
protected abstract boolean hasSuiteXmlFiles()
- Returns:
true
ifsuite-xml files array
is not empty.
-
getExcludedEnvironmentVariables
protected abstract java.lang.String[] getExcludedEnvironmentVariables()
-
getSuiteXmlFiles
public abstract java.io.File[] getSuiteXmlFiles()
-
setSuiteXmlFiles
public abstract void setSuiteXmlFiles(java.io.File[] suiteXmlFiles)
-
getRunOrder
public abstract java.lang.String getRunOrder()
-
setRunOrder
public abstract void setRunOrder(java.lang.String runOrder)
-
handleSummary
protected abstract void handleSummary(RunResult summary, java.lang.Exception firstForkException) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
isSkipExecution
protected abstract boolean isSkipExecution()
-
getDefaultIncludes
protected abstract java.lang.String[] getDefaultIncludes()
-
getReportSchemaLocation
protected abstract java.lang.String getReportSchemaLocation()
-
useModulePath
protected abstract boolean useModulePath()
-
setUseModulePath
protected abstract void setUseModulePath(boolean useModulePath)
-
getEnableProcessChecker
protected abstract java.lang.String getEnableProcessChecker()
-
getMojoArtifact
protected org.apache.maven.artifact.Artifact getMojoArtifact()
This plugin MOJO artifact.- Returns:
- non-null plugin artifact
-
getDefaultExcludes
private java.lang.String getDefaultExcludes()
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
setLogger
void setLogger(org.codehaus.plexus.logging.Logger logger)
-
getConsoleLogger
@Nonnull protected final PluginConsoleLogger getConsoleLogger()
-
setupStuff
private void setupStuff()
-
scanForTestClasses
@Nonnull private DefaultScanResult scanForTestClasses() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
scanDirectories
private DefaultScanResult scanDirectories() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
getProjectTestArtifacts
java.util.List<org.apache.maven.artifact.Artifact> getProjectTestArtifacts()
-
scanDependencies
DefaultScanResult scanDependencies() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
verifyParameters
boolean verifyParameters() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
-
executeAfterPreconditionsChecked
private void executeAfterPreconditionsChecked(@Nonnull DefaultScanResult scanResult) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
createProviders
protected java.util.List<ProviderInfo> createProviders(TestClassPath testClasspath) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
setupProperties
private SurefireProperties setupProperties()
-
systemPropertiesMatchingArgLine
private java.util.Set<java.lang.Object> systemPropertiesMatchingArgLine(SurefireProperties result)
-
showToLog
private void showToLog(SurefireProperties props, ConsoleLogger log)
-
executeProvider
@Nonnull private RunResult executeProvider(@Nonnull ProviderInfo provider, @Nonnull DefaultScanResult scanResult, @Nonnull TestClassPath testClasspathWrapper) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, SurefireExecutionException, SurefireBooterForkException, TestSetFailedException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
SurefireExecutionException
SurefireBooterForkException
TestSetFailedException
-
createCopyAndReplaceForkNumPlaceholder
public static SurefireProperties createCopyAndReplaceForkNumPlaceholder(SurefireProperties effectiveSystemProperties, int threadNumber)
-
cleanupForkConfiguration
protected void cleanupForkConfiguration(ForkConfiguration forkConfiguration)
-
logReportsDirectory
protected void logReportsDirectory()
-
getRepositorySystem
public org.apache.maven.repository.RepositorySystem getRepositorySystem()
-
setRepositorySystem
public void setRepositorySystem(org.apache.maven.repository.RepositorySystem repositorySystem)
-
getDependencyResolver
public org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver getDependencyResolver()
-
setDependencyResolver
public void setDependencyResolver(org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver dependencyResolver)
-
existsModuleDescriptor
private boolean existsModuleDescriptor()
-
getModuleDescriptor
private java.io.File getModuleDescriptor()
-
canExecuteProviderWithModularPath
private boolean canExecuteProviderWithModularPath(Platform platform)
-
convertTestNGParameters
private void convertTestNGParameters() throws org.apache.maven.plugin.MojoExecutionException
Converts old TestNG configuration parameters over to new properties based configuration method. (if any are defined the old way)- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getConfiguratorName
private static java.lang.String getConfiguratorName(org.apache.maven.artifact.versioning.ArtifactVersion version, PluginConsoleLogger log) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
convertGroupParameters
private void convertGroupParameters()
-
isAnyConcurrencySelected
protected boolean isAnyConcurrencySelected()
-
isAnyGroupsSelected
protected boolean isAnyGroupsSelected()
-
convertJunitCoreParameters
private void convertJunitCoreParameters() throws org.apache.maven.plugin.MojoExecutionException
Converts old JUnit configuration parameters over to new properties based configuration method. (if any are defined the old way)- Throws:
org.apache.maven.plugin.MojoExecutionException
-
checkNonForkedThreads
private void checkNonForkedThreads(java.lang.String parallel) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
onlyThreadCount
private boolean onlyThreadCount()
-
checkThreadCountEntity
private static void checkThreadCountEntity(int count, java.lang.String entity) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
isJunit47Compatible
private boolean isJunit47Compatible(org.apache.maven.artifact.Artifact artifact)
-
isAnyJunit4
private boolean isAnyJunit4(org.apache.maven.artifact.Artifact artifact)
-
isForkModeNever
private static boolean isForkModeNever(java.lang.String forkMode)
-
isForking
protected boolean isForking()
-
getEffectiveForkMode
java.lang.String getEffectiveForkMode()
-
getRunOrders
private java.util.List<RunOrder> getRunOrders()
-
requiresRunHistory
private boolean requiresRunHistory()
-
getEffectiveFailIfNoTests
private boolean getEffectiveFailIfNoTests()
-
createProviderConfiguration
private ProviderConfiguration createProviderConfiguration(RunOrderParameters runOrderParameters) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
toStringProperties
private static java.util.Map<java.lang.String,java.lang.String> toStringProperties(java.util.Properties properties)
-
getStatisticsFile
private java.io.File getStatisticsFile(java.lang.String configurationHash)
-
createStartupConfiguration
private StartupConfiguration createStartupConfiguration(@Nonnull ProviderInfo provider, boolean isInprocess, @Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull DefaultScanResult scanResult, @Nonnull Platform platform, @Nonnull TestClassPath testClasspathWrapper) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
newStartupConfigWithClasspath
private StartupConfiguration newStartupConfigWithClasspath(@Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull java.util.Set<org.apache.maven.artifact.Artifact> providerArtifacts, @Nonnull java.lang.String providerName, @Nonnull TestClassPath testClasspathWrapper)
-
retainInProcArtifactsUnique
private static java.util.Set<org.apache.maven.artifact.Artifact> retainInProcArtifactsUnique(java.util.Set<org.apache.maven.artifact.Artifact> providerArtifacts, org.apache.maven.artifact.Artifact... inPluginArtifacts)
-
hasGroupArtifactId
private static boolean hasGroupArtifactId(java.lang.String groupId, java.lang.String artifactId, org.apache.maven.artifact.Artifact artifact)
-
createInProcClasspath
private static Classpath createInProcClasspath(Classpath providerClasspath, java.util.Set<org.apache.maven.artifact.Artifact> newArtifacts)
-
getLocationManager
private org.codehaus.plexus.languages.java.jpms.LocationManager getLocationManager()
For testing purposes - Mockito.- Returns:
- plexus component
-
newStartupConfigWithModularPath
private StartupConfiguration newStartupConfigWithModularPath(@Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull java.util.Set<org.apache.maven.artifact.Artifact> providerArtifacts, @Nonnull java.lang.String providerName, @Nonnull java.io.File moduleDescriptor, @Nonnull DefaultScanResult scanResult, @Nonnull java.lang.String javaHome, @Nonnull TestClassPath testClasspathWrapper) throws java.io.IOException
- Throws:
java.io.IOException
-
getCommonArtifact
private org.apache.maven.artifact.Artifact getCommonArtifact()
-
getExtensionsArtifact
private org.apache.maven.artifact.Artifact getExtensionsArtifact()
-
getApiArtifact
private org.apache.maven.artifact.Artifact getApiArtifact()
-
getLoggerApiArtifact
private org.apache.maven.artifact.Artifact getLoggerApiArtifact()
-
getBooterArtifact
private org.apache.maven.artifact.Artifact getBooterArtifact()
-
getShadefireArtifact
private org.apache.maven.artifact.Artifact getShadefireArtifact()
-
getStartupReportConfiguration
private StartupReportConfiguration getStartupReportConfiguration(java.lang.String configChecksum, boolean isForkMode)
-
isSpecificTestSpecified
private boolean isSpecificTestSpecified()
-
readListFromFile
@Nonnull private java.util.List<java.lang.String> readListFromFile(@Nonnull java.io.File file)
-
maybeAppendList
private void maybeAppendList(java.util.List<java.lang.String> base, java.util.List<java.lang.String> list)
-
getExcludeList
@Nonnull private java.util.List<java.lang.String> getExcludeList() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
getIncludeList
private java.util.List<java.lang.String> getIncludeList() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
checkMethodFilterInIncludesExcludes
private void checkMethodFilterInIncludesExcludes(java.lang.Iterable<java.lang.String> patterns) throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
getIncludedAndExcludedTests
private TestListResolver getIncludedAndExcludedTests() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
getSpecificTests
public TestListResolver getSpecificTests()
-
filterNulls
@Nonnull private java.util.List<java.lang.String> filterNulls(@Nonnull java.util.List<java.lang.String> toFilter)
-
getTestNgArtifact
private org.apache.maven.artifact.Artifact getTestNgArtifact() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createVersionRange
private org.apache.maven.artifact.versioning.VersionRange createVersionRange()
-
getJunitArtifact
private org.apache.maven.artifact.Artifact getJunitArtifact()
-
getJunitDepArtifact
private org.apache.maven.artifact.Artifact getJunitDepArtifact()
-
getJunitPlatformArtifact
private org.apache.maven.artifact.Artifact getJunitPlatformArtifact()
-
createForkStarter
private ForkStarter createForkStarter(@Nonnull ProviderInfo provider, @Nonnull ForkConfiguration forkConfiguration, @Nonnull ClassLoaderConfiguration classLoaderConfiguration, @Nonnull RunOrderParameters runOrderParameters, @Nonnull ConsoleLogger log, @Nonnull DefaultScanResult scanResult, @Nonnull Platform platform, @Nonnull TestClassPath testClasspathWrapper) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
createInprocessStarter
private InPluginVMSurefireStarter createInprocessStarter(@Nonnull ProviderInfo provider, @Nonnull ClassLoaderConfiguration classLoaderConfig, @Nonnull RunOrderParameters runOrderParameters, @Nonnull DefaultScanResult scanResult, @Nonnull Platform platform, @Nonnull TestClassPath testClasspathWrapper) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
createForkConfiguration
@Nonnull private ForkConfiguration createForkConfiguration(Platform platform)
-
ensureEnableProcessChecker
private void ensureEnableProcessChecker() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
convertDeprecatedForkMode
private void convertDeprecatedForkMode()
-
getEffectiveForkCount
protected int getEffectiveForkCount()
-
convertWithCoreCount
protected int convertWithCoreCount(java.lang.String count)
-
getEffectiveDebugForkedProcess
private java.lang.String getEffectiveDebugForkedProcess()
-
getEffectiveJvm
private JdkAttributes getEffectiveJvm() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
getSurefireTempDir
java.io.File getSurefireTempDir()
Where surefire stores its own temp files- Returns:
- A file pointing to the location of surefire's own temp files
-
getConfigChecksum
private java.lang.String getConfigChecksum()
Operates on raw plugin parameters, not the "effective" values.- Returns:
- The checksum
-
addPluginSpecificChecksumItems
protected void addPluginSpecificChecksumItems(ChecksumCalculator checksum)
-
hasExecutedBefore
protected boolean hasExecutedBefore()
-
getClassLoaderConfiguration
@Nonnull protected ClassLoaderConfiguration getClassLoaderConfiguration()
-
generateTestClasspath
private TestClassPath generateTestClasspath()
Generates the test classpath.- Returns:
- the classpath elements
-
filterArtifacts
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.- Parameters:
artifacts
- The unfiltered artifactsfilter
- The filter to apply- Returns:
- The filtered result
-
showMap
private void showMap(java.util.Map<?,?> map, java.lang.String setting)
-
showArray
private <T> void showArray(T[] array, java.lang.String setting)
-
getArtifactClasspath
private Classpath getArtifactClasspath(org.apache.maven.artifact.Artifact surefireArtifact)
-
getUserProperties
private java.util.Properties getUserProperties()
-
ensureWorkingDirectoryExists
private void ensureWorkingDirectoryExists() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
ensureParallelRunningCompatibility
private void ensureParallelRunningCompatibility() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
ensureThreadCountWithPerThread
private void ensureThreadCountWithPerThread() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
warnIfUselessUseSystemClassLoaderParameter
private void warnIfUselessUseSystemClassLoaderParameter()
-
isNotForking
private boolean isNotForking()
-
commandLineOptions
private java.util.List<CommandLineOption> commandLineOptions()
-
warnIfDefunctGroupsCombinations
private void warnIfDefunctGroupsCombinations() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
-
warnIfRerunClashes
private void warnIfRerunClashes() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
warnIfWrongShutdownValue
private void warnIfWrongShutdownValue() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
warnIfNotApplicableSkipAfterFailureCount
private void warnIfNotApplicableSkipAfterFailureCount() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
warnIfIllegalTempDir
private void warnIfIllegalTempDir() throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
createSurefireBootDirectoryInBuild
java.io.File createSurefireBootDirectoryInBuild()
-
createSurefireBootDirectoryInTemp
java.io.File createSurefireBootDirectoryInTemp()
-
getExcludes
public java.util.List<java.lang.String> getExcludes()
- Specified by:
getExcludes
in interfaceSurefireExecutionParameters
-
setExcludes
public void setExcludes(java.util.List<java.lang.String> excludes)
- Specified by:
setExcludes
in interfaceSurefireExecutionParameters
-
getLocalRepository
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
- Specified by:
getLocalRepository
in interfaceSurefireExecutionParameters
-
setLocalRepository
public void setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
- Specified by:
setLocalRepository
in interfaceSurefireExecutionParameters
-
getSystemProperties
public java.util.Properties getSystemProperties()
-
setSystemProperties
public void setSystemProperties(java.util.Properties systemProperties)
-
getSystemPropertyVariables
public java.util.Map<java.lang.String,java.lang.String> getSystemPropertyVariables()
-
setSystemPropertyVariables
public void setSystemPropertyVariables(java.util.Map<java.lang.String,java.lang.String> systemPropertyVariables)
-
getSystemPropertiesFile
public java.io.File getSystemPropertiesFile()
-
setSystemPropertiesFile
public void setSystemPropertiesFile(java.io.File systemPropertiesFile)
-
getProperties
private java.util.Properties getProperties()
-
setProperties
public void setProperties(java.util.Properties properties)
-
getPluginArtifactMap
public java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> getPluginArtifactMap()
-
setPluginArtifactMap
public void setPluginArtifactMap(java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> pluginArtifactMap)
-
getProjectArtifactMap
public java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> getProjectArtifactMap()
-
setProjectArtifactMap
public void setProjectArtifactMap(java.util.Map<java.lang.String,org.apache.maven.artifact.Artifact> projectArtifactMap)
-
getReportNameSuffix
public java.lang.String getReportNameSuffix()
-
setReportNameSuffix
public void setReportNameSuffix(java.lang.String reportNameSuffix)
-
isRedirectTestOutputToFile
public boolean isRedirectTestOutputToFile()
-
setRedirectTestOutputToFile
public void setRedirectTestOutputToFile(boolean redirectTestOutputToFile)
-
getFailIfNoTests
public java.lang.Boolean getFailIfNoTests()
-
setFailIfNoTests
public void setFailIfNoTests(boolean failIfNoTests)
-
getForkMode
public java.lang.String getForkMode()
-
setForkMode
public void setForkMode(java.lang.String forkMode)
-
getJvm
public java.lang.String getJvm()
-
getArgLine
public java.lang.String getArgLine()
-
setArgLine
public void setArgLine(java.lang.String argLine)
-
getEnvironmentVariables
public java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables()
-
setEnvironmentVariables
public void setEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables)
-
getWorkingDirectory
public java.io.File getWorkingDirectory()
-
setWorkingDirectory
public void setWorkingDirectory(java.io.File workingDirectory)
-
isChildDelegation
public boolean isChildDelegation()
-
setChildDelegation
public void setChildDelegation(boolean childDelegation)
-
getGroups
public java.lang.String getGroups()
-
setGroups
public void setGroups(java.lang.String groups)
-
getExcludedGroups
public java.lang.String getExcludedGroups()
-
setExcludedGroups
public void setExcludedGroups(java.lang.String excludedGroups)
-
getJunitArtifactName
public java.lang.String getJunitArtifactName()
-
setJunitArtifactName
public void setJunitArtifactName(java.lang.String junitArtifactName)
-
getTestNGArtifactName
public java.lang.String getTestNGArtifactName()
-
setTestNGArtifactName
public void setTestNGArtifactName(java.lang.String testNGArtifactName)
-
getThreadCount
public int getThreadCount()
-
setThreadCount
public void setThreadCount(int threadCount)
-
getPerCoreThreadCount
public boolean getPerCoreThreadCount()
-
setPerCoreThreadCount
public void setPerCoreThreadCount(boolean perCoreThreadCount)
-
getUseUnlimitedThreads
public boolean getUseUnlimitedThreads()
-
setUseUnlimitedThreads
public void setUseUnlimitedThreads(boolean useUnlimitedThreads)
-
getParallel
public java.lang.String getParallel()
-
setParallel
public void setParallel(java.lang.String parallel)
-
isParallelOptimized
public boolean isParallelOptimized()
-
setParallelOptimized
public void setParallelOptimized(boolean parallelOptimized)
-
getThreadCountSuites
public int getThreadCountSuites()
-
setThreadCountSuites
public void setThreadCountSuites(int threadCountSuites)
-
getThreadCountClasses
public int getThreadCountClasses()
-
setThreadCountClasses
public void setThreadCountClasses(int threadCountClasses)
-
getThreadCountMethods
public int getThreadCountMethods()
-
setThreadCountMethods
public void setThreadCountMethods(int threadCountMethods)
-
isTrimStackTrace
public boolean isTrimStackTrace()
-
setTrimStackTrace
public void setTrimStackTrace(boolean trimStackTrace)
-
getProjectRemoteRepositories
public java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> getProjectRemoteRepositories()
-
setProjectRemoteRepositories
public void setProjectRemoteRepositories(java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> projectRemoteRepositories)
-
getRemoteRepositories
public java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepositories()
-
setRemoteRepositories
public void setRemoteRepositories(java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories)
-
isDisableXmlReport
public boolean isDisableXmlReport()
-
setDisableXmlReport
public void setDisableXmlReport(boolean disableXmlReport)
-
isEnableAssertions
public boolean isEnableAssertions()
-
effectiveIsEnableAssertions
public boolean effectiveIsEnableAssertions()
-
setEnableAssertions
public void setEnableAssertions(boolean enableAssertions)
-
getSession
public org.apache.maven.execution.MavenSession getSession()
-
setSession
public void setSession(org.apache.maven.execution.MavenSession session)
-
getObjectFactory
public java.lang.String getObjectFactory()
-
setObjectFactory
public void setObjectFactory(java.lang.String objectFactory)
-
getToolchainManager
public org.apache.maven.toolchain.ToolchainManager getToolchainManager()
-
setToolchainManager
public void setToolchainManager(org.apache.maven.toolchain.ToolchainManager toolchainManager)
-
isMavenParallel
public boolean isMavenParallel()
-
getDependenciesToScan
public java.lang.String[] getDependenciesToScan()
-
setDependenciesToScan
public void setDependenciesToScan(java.lang.String[] dependenciesToScan)
-
setPluginDescriptor
void setPluginDescriptor(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
-
getPluginDescriptor
public org.apache.maven.plugin.descriptor.PluginDescriptor getPluginDescriptor()
-
getProject
public org.apache.maven.project.MavenProject getProject()
-
setProject
public void setProject(org.apache.maven.project.MavenProject project)
-
getTestSourceDirectory
public java.io.File getTestSourceDirectory()
- Specified by:
getTestSourceDirectory
in interfaceSurefireExecutionParameters
-
setTestSourceDirectory
public void setTestSourceDirectory(java.io.File testSourceDirectory)
- Specified by:
setTestSourceDirectory
in interfaceSurefireExecutionParameters
-
getForkCount
public java.lang.String getForkCount()
-
isReuseForks
public boolean isReuseForks()
-
getAdditionalClasspathElements
public java.lang.String[] getAdditionalClasspathElements()
-
setAdditionalClasspathElements
public void setAdditionalClasspathElements(java.lang.String[] additionalClasspathElements)
-
getClasspathDependencyExcludes
public java.lang.String[] getClasspathDependencyExcludes()
-
setClasspathDependencyExcludes
public void setClasspathDependencyExcludes(java.lang.String[] classpathDependencyExcludes)
-
getClasspathDependencyScopeExclude
public java.lang.String getClasspathDependencyScopeExclude()
-
setClasspathDependencyScopeExclude
public void setClasspathDependencyScopeExclude(java.lang.String classpathDependencyScopeExclude)
-
getProjectBuildDirectory
public java.io.File getProjectBuildDirectory()
-
setProjectBuildDirectory
public void setProjectBuildDirectory(java.io.File projectBuildDirectory)
-
logDebugOrCliShowErrors
protected void logDebugOrCliShowErrors(java.lang.String s)
-
getTempDir
public java.lang.String getTempDir()
-
setTempDir
public void setTempDir(java.lang.String tempDir)
-
getEffectiveForkMode
private static java.lang.String getEffectiveForkMode(java.lang.String forkMode)
-
-