this.getLog().info(" A n d r o M D A T r a n s l a t i o n - L i b r a r y T e s t S u i t e ");
this.getLog().info("--------------------------------------------------------------------------------");
this.initializeClasspathFromClassPathElements(this.project.getTestClasspathElements());
final TranslationTestProcessor processor = TranslationTestProcessor.instance();
processor.setTranslationName(this.translationName);
processor.setUseTraceTranslator(this.traceExpression);
processor.setTestSourceDirectory(this.testSourceDirectory);
final URL configurationUri = ResourceUtils.toURL(this.configurationUri);
if (configurationUri == null)
{
throw new MojoExecutionException("No configuration could be loaded from --> '" +
this.configurationUri + "'");
}
processor.setConfiguration(this.getConfiguration(configurationUri));
final TranslationLibraryTestFormatter formatter = new TranslationLibraryTestFormatter();
// - set the report location
final File report = new File(this.reportDirectory, this.getProject().getArtifactId() + ".txt");
formatter.setReportFile(report);
final TestResult result = new TestResult();
formatter.startTestSuite(this.getProject().getName());
result.addListener(formatter);
processor.setResult(result);
processor.runSuite();
this.getLog().info("");
this.getLog().info("Results:");
this.getLog().info(formatter.endTestSuite());
if (result.failureCount() > 0 || result.errorCount() > 0)
{
throw new MojoExecutionException("Test are some test failures");
}
processor.shutdown();
}
catch (final Throwable throwable)
{
if (throwable instanceof MojoExecutionException)
{