new ReporterConfiguration( getReportsDirectory(), isTrimStackTrace() );
Artifact testNgArtifact;
testNgArtifact = getTestNgArtifact();
DirectoryScannerParameters directoryScannerParameters = null;
final boolean isTestNg = testNgArtifact != null;
TestArtifactInfo testNg =
isTestNg ? new TestArtifactInfo( testNgArtifact.getVersion(), testNgArtifact.getClassifier() ) : null;
List<File> testXml = getSuiteXmlFiles() != null ? Arrays.asList( getSuiteXmlFiles() ) : null;
TestRequest testSuiteDefinition =
new TestRequest( testXml, getTestSourceDirectory(), getTest(), getTestMethod() );
final boolean failIfNoTests;
if ( isValidSuiteXmlFileConfig() && getTest() == null )
{
failIfNoTests = getFailIfNoTests() != null && getFailIfNoTests();
if ( !isTestNg )
{
throw new MojoExecutionException( "suiteXmlFiles is configured, but there is no TestNG dependency" );
}
}
else
{
if ( isSpecificTestSpecified() )
{
failIfNoTests = getEffectiveFailIfNoTests();
setFailIfNoTests( failIfNoTests );
}
else
{
failIfNoTests = getFailIfNoTests() != null && getFailIfNoTests();
}
List<String> includes = getIncludeList();
List<String> excludes = getExcludeList();
List<String> specificTests = getSpecificTests();
directoryScannerParameters =
new DirectoryScannerParameters( getTestClassesDirectory(), includes, excludes, specificTests,
failIfNoTests, getRunOrder() );
}
Properties providerProperties = getProperties();