creadur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r1450960 - /creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
Date Wed, 27 Feb 2013 21:12:01 GMT
Author: rdonkin
Date: Wed Feb 27 21:12:00 2013
New Revision: 1450960

URL: http://svn.apache.org/r1450960
Log:
RAT-126 log information about included resources.

Modified:
    creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java

Modified: creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java?rev=1450960&r1=1450959&r2=1450960&view=diff
==============================================================================
--- creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
(original)
+++ creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
Wed Feb 27 21:12:00 2013
@@ -287,6 +287,7 @@ public abstract class AbstractRatMojo ex
         ds.scan();
         whenDebuggingLogExcludedFiles(ds);
         final String[] files = ds.getIncludedFiles();
+        logAboutIncludedFiles(files);
         try
         {
             return new FilesReportable( basedir, files );
@@ -297,6 +298,19 @@ public abstract class AbstractRatMojo ex
         }
     }
 
+    private void logAboutIncludedFiles(final String[] files) {
+        if (files.length == 0) {
+            getLog().warn("No resources included.");
+        } else {
+            getLog().info(files.length + " resources included (use -debug for more details)");
+            if(getLog().isDebugEnabled()) {
+                for (String resource: files) {
+                    getLog().debug(" - included " + resource);
+                }
+            }
+        }
+    }
+
     private void whenDebuggingLogExcludedFiles(final DirectoryScanner ds) {
         if (getLog().isDebugEnabled()) {
             final String[] excludedFiles = ds.getExcludedFiles();



Mime
View raw message