geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r344859 - /geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/FileIncludeExtention.java
Date Wed, 16 Nov 2005 03:11:09 GMT
Author: dblevins
Date: Tue Nov 15 19:11:06 2005
New Revision: 344859

URL: http://svn.apache.org/viewcvs?rev=344859&view=rev
Log:
Modified it so the Extention will include anything that matches the configured prefix

Modified:
    geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/FileIncludeExtention.java

Modified: geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/FileIncludeExtention.java
URL: http://svn.apache.org/viewcvs/geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/FileIncludeExtention.java?rev=344859&r1=344858&r2=344859&view=diff
==============================================================================
--- geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/FileIncludeExtention.java
(original)
+++ geronimo/gbuild/trunk/gbuild-agent/src/main/java/org/apache/geronimo/gbuild/agent/FileIncludeExtention.java
Tue Nov 15 19:11:06 2005
@@ -23,6 +23,8 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.Map;
+import java.util.Iterator;
+import java.util.Set;
 
 /**
  * @version $Rev$ $Date$
@@ -37,15 +39,24 @@
     /**
      * @plexus.configuration
      */
-    private String fileNameKey;
+    private String prefix;
 
 
     public void preProcess(Map build) {
     }
 
-    // TODO: Maybe allow for the file contents to be compressed
     public void postProcess(Map build, Map results) {
+        Iterator keys = build.keySet().iterator();
+        while (keys.hasNext()) {
+            String key = (String) keys.next();
+            if (key.startsWith(prefix)){
+                include(key, build, results);
+            }
+        }
+    }
 
+    // TODO: Maybe allow for the file contents to be compressed
+    private void include(String fileNameKey, Map build, Map results) {
         getLogger().debug("Looking for " + fileNameKey);
 
         String fileName = (String) build.get(fileNameKey);



Mime
View raw message