@SuppressWarnings({"serial", "PMD.AvoidFinalLocalVariable"})
@Override
public final boolean postExecute(final MavenBuildProxy build, final MavenProject pom, final MojoInfo mojo,
final BuildListener listener, final Throwable error) throws InterruptedException, IOException {
PluginLogger logger = new LoggerFactory().createLogger(listener.getLogger(), pluginName);
if (!acceptGoal(mojo.getGoal())) {
return true;
}
Result currentResult = getCurrentResult(build);
if (!canContinue(currentResult)) {
logger.log("Skipping reporter since build result is " + currentResult);
return true;
}
if (hasResultAction(build)) {
logger.log("Skipping maven reporter: there is already a result available.");
return true;
}
final ParserResult result = perform(build, pom, mojo, logger);
defaultEncoding = pom.getProperties().getProperty("project.build.sourceEncoding");
if (defaultEncoding == null) {
logger.log(Messages.Reporter_Error_NoEncoding(Charset.defaultCharset().displayName()));
result.addErrorMessage(pom.getName(), Messages.Reporter_Error_NoEncoding(Charset.defaultCharset().displayName()));
}
build.execute(new BuildCallable<Void, IOException>() {
@Override