geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r486415 - /geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/CopyLegalFilesMojo.java
Date Tue, 12 Dec 2006 23:39:00 GMT
Author: jdillon
Date: Tue Dec 12 15:39:00 2006
New Revision: 486415

URL: http://svn.apache.org/viewvc?view=rev&rev=486415
Log:
Added strict flag to fail builds when no legal files are found

Modified:
    geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/CopyLegalFilesMojo.java

Modified: geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/CopyLegalFilesMojo.java
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/CopyLegalFilesMojo.java?view=diff&rev=486415&r1=486414&r2=486415
==============================================================================
--- geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/CopyLegalFilesMojo.java
(original)
+++ geronimo/genesis/trunk/plugins/tools-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/tools/CopyLegalFilesMojo.java
Tue Dec 12 15:39:00 2006
@@ -78,7 +78,14 @@
      * @parameter
      */
     private DirectoryScanner fileset;
-
+    
+    /**
+     * When set to true, fail the build when no legal files are found.
+     *
+     * @paramater default-value="false"
+     */
+    private boolean strict;
+    
     /**
      * @component
      */
@@ -128,7 +135,13 @@
         String[] filenames = fileset.getIncludedFiles();
 
         if (filenames.length == 0) {
-            log.error("No legal files found to copy");
+            if (strict) {
+                throw new MojoExecutionException("No legal files found to copy");
+            }
+            else {
+                log.warn("No legal files found to copy");
+            }
+            
             return;
         }
 



Mime
View raw message