Author: pottlinger
Date: Tue May 19 22:00:15 2015
New Revision: 1680405

URL: http://svn.apache.org/r1680405
Log:
RAT-179: Tweaking UI/console output.

* Explicitly log that unapproved files were accepted by configuration.
* Use 'license' instead of 'licence'.

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

Modified: 
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java
URL: 
http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java?rev=1680405&r1=1680404&r2=1680405&view=diff
==============================================================================
--- 
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java
 (original)
+++ 
creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/RatCheckMojo.java
 Tue May 19 22:00:15 2015
@@ -54,7 +54,6 @@ public class RatCheckMojo extends Abstra
      * report or "xml" for the raw XML report. Alternatively you can give the
      * path of an XSL transformation that will be applied on the raw XML to
      * produce the report written to the output file.
-     *
      */
     @Parameter(property = "rat.outputStyle", defaultValue = "plain")
     private String reportStyle;
@@ -159,7 +158,17 @@ public class RatCheckMojo extends Abstra
 
     protected void check(ClaimStatistic statistics)
             throws MojoFailureException {
-        getLog().info("Rat check: Summary of files. Unapproved: " + 
statistics.getNumUnApproved() + " unknown: " + statistics.getNumUnknown() + " 
generated: " + statistics.getNumGenerated() + " approved: " + 
statistics.getNumApproved() + " licence.");
+        if (numUnapprovedLicenses > 0) {
+            getLog().info("You requested to accept " + numUnapprovedLicenses + 
" files with unapproved licenses.");
+        }
+
+        int numApproved = statistics.getNumApproved();
+        getLog().info("Rat check: Summary over all files. Unapproved: " + 
statistics.getNumUnApproved() + //
+                ", unknown: " + statistics.getNumUnknown() + //
+                ", generated: " + statistics.getNumGenerated() + //
+                ", approved: " + numApproved + //
+                (numApproved > 0 ? " licenses." : " license."));
+
         if (numUnapprovedLicenses < statistics.getNumUnApproved()) {
             if (consoleOutput) {
                 try {


Reply via email to