This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MSHARED-1032
in repository https://gitbox.apache.org/repos/asf/maven-reporting-impl.git

commit 475fc7f9598ca02998219f10b83c0aa7aa1c7cd8
Author: Michael Osipov <[email protected]>
AuthorDate: Sat Jun 24 21:49:31 2023 +0200

    [MSHARED-1279] Upgrade to Maven Reporting API 4.0.0-M7
---
 pom.xml                                                        |  2 +-
 .../java/org/apache/maven/reporting/AbstractMavenReport.java   | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index eec5d90..faf1a83 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,7 @@
     <mavenVersion>3.2.5</mavenVersion>
     <doxiaVersion>2.0.0-M7</doxiaVersion>
     <doxiaSitetoolsVersion>2.0.0-M10</doxiaSitetoolsVersion>
-    <reportingApiVersion>4.0.0-M6</reportingApiVersion>
+    <reportingApiVersion>4.0.0-M7-SNAPSHOT</reportingApiVersion>
     <pluginToolsVersion>3.9.0</pluginToolsVersion>
     
<project.build.outputTimestamp>2023-04-26T20:33:54Z</project.build.outputTimestamp>
   </properties>
diff --git a/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java 
b/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java
index f4feb97..304edc8 100644
--- a/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java
+++ b/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java
@@ -177,8 +177,12 @@ public abstract class AbstractMavenReport extends 
AbstractMojo implements MavenM
      */
     @Override
     public void execute() throws MojoExecutionException {
-        if (!canGenerateReport()) {
-            return;
+        try {
+            if (!canGenerateReport()) {
+                return;
+            }
+        } catch (MavenReportException e) {
+            throw new MojoExecutionException("Failed to determine whether 
report can be generated", e);
         }
 
         if (outputFormat != null) {
@@ -429,7 +433,7 @@ public abstract class AbstractMavenReport extends 
AbstractMojo implements MavenM
     }
 
     @Override
-    public boolean canGenerateReport() {
+    public boolean canGenerateReport() throws MavenReportException {
         return true;
     }
 

Reply via email to