try {
analyzer.execute(ruleSet);
} catch (AnalysisException e) {
throw new MojoExecutionException("Analysis failed.", e);
}
ReportHelper reportHelper = new ReportHelper(console);
store.beginTransaction();
try {
reportHelper.verifyConceptResults(inMemoryReportWriter);
int violations = reportHelper.verifyConstraintViolations(inMemoryReportWriter);
if (failOnConstraintViolations && violations > 0) {
throw new MojoFailureException(violations + " constraints have been violated!");
}
} catch (AnalysisListenerException e) {
throw new MojoExecutionException("Cannot print report.", e);