You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@creadur.apache.org by rd...@apache.org on 2013/02/27 22:00:21 UTC
svn commit: r1450955 -
/creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java
Author: rdonkin
Date: Wed Feb 27 21:00:21 2013
New Revision: 1450955
URL: http://svn.apache.org/r1450955
Log:
RAT-126 Improve debugging messages. Thanks to Bernd Eckenfels for suggestions in https://issues.apache.org/jira/browse/RAT-126
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=1450955&r1=1450954&r2=1450955&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:00:21 2013
@@ -280,11 +280,12 @@ public abstract class AbstractRatMojo ex
*/
protected IReportable getResources()
{
- DirectoryScanner ds = new DirectoryScanner();
+ final DirectoryScanner ds = new DirectoryScanner();
ds.setBasedir( basedir );
setExcludes( ds );
setIncludes( ds );
ds.scan();
+ whenDebuggingLogExcludedFiles(ds);
final String[] files = ds.getIncludedFiles();
try
{
@@ -296,6 +297,20 @@ public abstract class AbstractRatMojo ex
}
}
+ private void whenDebuggingLogExcludedFiles(final DirectoryScanner ds) {
+ if (getLog().isDebugEnabled()) {
+ final String[] excludedFiles = ds.getExcludedFiles();
+ if (excludedFiles.length == 0) {
+ getLog().debug("No excluded resources.");
+ } else {
+ getLog().debug("Excluded " + excludedFiles.length + " resources:");
+ for (final String resource : excludedFiles) {
+ getLog().debug(" - excluded " + resource);
+ }
+ }
+ }
+ }
+
private void setIncludes( DirectoryScanner ds )
{
if ( includes != null )