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

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

commit 320ea268d0673bc4d0c5ad44fa67fa8d2cfdfb49
Author: Michael Osipov <[email protected]>
AuthorDate: Sun Oct 1 21:10:18 2023 +0200

    [MSHARED-1298] Missing site report should be detected
    
    This closes #19
---
 .../reporting/exec/DefaultMavenReportExecutor.java    | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java 
b/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
index ff56597..4c7bfa9 100644
--- 
a/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
+++ 
b/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
@@ -290,14 +290,10 @@ public class DefaultMavenReportExecutor implements 
MavenReportExecutor {
                 EXCLUDES);
 
         if (!isMavenReport(mojoExecution, pluginDescriptor)) {
-            if (hasUserDefinedReports) {
-                // reports were explicitly written in the POM
-                LOGGER.warn(
-                        "Ignoring {}:{}"
-                                + " goal since it is not a report: should be 
removed from reporting configuration in POM",
-                        mojoExecution.getPlugin().getId(),
-                        report.getGoal());
-            }
+            // reports were explicitly written in the POM
+            LOGGER.warn("Ignoring {}:{}"
+                            + " goal since it is not a report: should be 
removed from reporting configuration in POM",
+                    mojoExecution.getPlugin().getId(), report.getGoal());
             return null;
         }
 
@@ -411,15 +407,14 @@ public class DefaultMavenReportExecutor implements 
MavenReportExecutor {
 
             if (LOGGER.isDebugEnabled()) {
                 if (mojoDescriptor != null && 
mojoDescriptor.getImplementationClass() != null) {
-                    LOGGER.debug(
-                            "Class {} is MavenReport: ",
+                    LOGGER.debug("Class {} is {}a MavenReport",
                             mojoDescriptor.getImplementationClass().getName(),
-                            isMavenReport);
+                            isMavenReport ? "" : "NOT ");
                 }
 
                 if (!isMavenReport) {
                     LOGGER.debug(
-                            "Skipping non MavenReport {}",
+                            "Skipping non-MavenReport {}",
                             mojoExecution.getMojoDescriptor().getId());
                 }
             }

Reply via email to