catch ( InvalidVersionSpecificationException e )
{
throw new MojoExecutionException( "Error determining the TestNG version requested: " + e.getMessage(), e );
}
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() )
{
if ( getFailIfNoSpecifiedTests() != null )
{
failIfNoTests = getFailIfNoSpecifiedTests().booleanValue();
}
else if ( getFailIfNoTests() != null )
{
failIfNoTests = getFailIfNoTests().booleanValue();
}
else
{
failIfNoTests = true;
}
setFailIfNoTests( Boolean.valueOf( failIfNoTests ) );
}
else
{
failIfNoTests = getFailIfNoTests() != null && getFailIfNoTests().booleanValue();
}
List<String> includes = getIncludeList();
List<String> excludes = getExcludeList();
List<String> specificTests = getSpecificTests();
directoryScannerParameters =
new DirectoryScannerParameters( getTestClassesDirectory(), includes, excludes, specificTests,
failIfNoTests, getRunOrder() );
}
Properties providerProperties = getProperties();
if ( providerProperties == null )