added initialize method to resolve issue with initializing the logger

Former-commit-id: 9123f1243375c4443e6617db1de69bbcceaf1130
This commit is contained in:
Jeremy Long
2014-12-03 05:56:33 -05:00
parent 0cd43ce35c
commit aa0d7cb4e9

View File

@@ -138,6 +138,11 @@ public abstract class ReportAggregationMojo extends AbstractMojo implements Mave
return true; return true;
} }
/**
* Initializes the mojo.
*/
protected abstract void initialize();
/** /**
* The collection of child projects. * The collection of child projects.
*/ */
@@ -204,6 +209,7 @@ public abstract class ReportAggregationMojo extends AbstractMojo implements Mave
*/ */
public final void execute() throws MojoExecutionException, MojoFailureException { public final void execute() throws MojoExecutionException, MojoFailureException {
try { try {
initialize();
preExecute(); preExecute();
performExecute(); performExecute();
} finally { } finally {
@@ -273,6 +279,7 @@ public abstract class ReportAggregationMojo extends AbstractMojo implements Mave
*/ */
public final void generate(Sink sink, Locale locale) throws MavenReportException { public final void generate(Sink sink, Locale locale) throws MavenReportException {
try { try {
initialize();
preGenerate(); preGenerate();
if (canGenerateNonAggregateReport()) { if (canGenerateNonAggregateReport()) {
executeNonAggregateReport(locale); executeNonAggregateReport(locale);