@Override
protected void aggregate(MavenProject baseProject, Set<MavenProject> projects, Store store) throws MojoExecutionException, MojoFailureException {
getLog().info("Exporting rules for '" + baseProject.getName() + "'.");
final RuleSet ruleSet = resolveEffectiveRules(baseProject);
RuleSetWriter ruleSetWriter = new RuleSetWriterImpl();
String exportedRules = baseProject.getBuild().getDirectory() + "/jqassistant/jqassistant-rules.xml";
Writer writer;
try {
writer = new FileWriter(exportedRules);
} catch (IOException e) {
throw new MojoExecutionException("Cannot create writer for rule export.", e);
}
ruleSetWriter.write(ruleSet, writer);
}