maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1465340 - /maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
Date Sun, 07 Apr 2013 08:02:39 GMT
Author: hboutemy
Date: Sun Apr  7 08:02:39 2013
New Revision: 1465340

URL: http://svn.apache.org/r1465340
Log:
add a warning if POM refers to some goals that are not reports

Modified:
    maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java

Modified: maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java?rev=1465340&r1=1465339&r2=1465340&view=diff
==============================================================================
--- maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
(original)
+++ maven/shared/trunk/maven-reporting-exec/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
Sun Apr  7 08:02:39 2013
@@ -183,9 +183,11 @@ public class DefaultMavenReportExecutor
 
         List<GoalWithConf> goalsWithConfiguration = new ArrayList<GoalWithConf>();
 
+        boolean userDefinedReports = true;
         if ( reportPlugin.getReportSets().isEmpty() && reportPlugin.getReports().isEmpty()
)
         {
             // by default, use every goal, which will be filtered later to only keep reporting
goals
+            userDefinedReports = false;
             List<MojoDescriptor> mojoDescriptors = pluginDescriptor.getMojos();
             for ( MojoDescriptor mojoDescriptor : mojoDescriptors )
             {
@@ -228,6 +230,11 @@ public class DefaultMavenReportExecutor
 
             if ( !isMavenReport( mojoExecution, pluginDescriptor ) )
             {
+                if ( userDefinedReports )
+                {
+                    // reports were explicitly written in the POM
+                    logger.warn( mojoExecution.getPlugin().getId() + ':' + report.getGoal()
+ " is not a report" );
+                }
                 continue;
             }
 



Mime
View raw message