Skip to content

Commit

Permalink
[MSITE-987] Consistently log when skipping report goal execution
Browse files Browse the repository at this point in the history
This closes #162
  • Loading branch information
michael-o committed Nov 21, 2023
1 parent fea5067 commit 8ceb7b0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,14 @@ protected List<MavenReportExecution> getReports() throws MojoExecutionException
// filter out reports that can't be generated
List<MavenReportExecution> reportExecutions = new ArrayList<>(allReports.size());
for (MavenReportExecution exec : allReports) {
String reportMojoInfo = exec.getPlugin().getId() + ":" + exec.getGoal();
try {
if (exec.canGenerateReport()) {
reportExecutions.add(exec);
} else if (exec.isUserDefined()) {
getLog().info("Skipping " + reportMojoInfo + " report");
}
} catch (MavenReportException e) {
String reportMojoInfo = exec.getPlugin().getId() + ":" + exec.getGoal();
throw new MojoExecutionException(
"Failed to determine whether report '" + reportMojoInfo + "' can be generated", e);
}
Expand Down

0 comments on commit 8ceb7b0

Please sign in to comment.