geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r603148 - /geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java
Date Tue, 11 Dec 2007 05:50:39 GMT
Author: gawor
Date: Mon Dec 10 21:50:29 2007
New Revision: 603148

URL: http://svn.apache.org/viewvc?rev=603148&view=rev
Log:
bring back batch files and don't mark all files with 'execute' permissions

Modified:
    geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java

Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java?rev=603148&r1=603147&r2=603148&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/ArchiverGBean.java
Mon Dec 10 21:50:29 2007
@@ -39,7 +39,7 @@
 //import org.codehaus.plexus.archiver.util.DefaultFileSet;
 
 /**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
  */
 public class ArchiverGBean implements ServerArchiver {
 
@@ -76,17 +76,18 @@
         all.setDirectory(source);
         archiver.addFileSet(all);
 */
-        //workaround code
+        
+        // add in all files and mark them with default file permissions
         Map<String, File> all = IOUtil.listAllFileNames(source);
         for (Map.Entry<String, File> entry : all.entrySet()) {
             String destFileName = serverName + "/" + entry.getKey();
             File sourceFile = entry.getValue();
-            if (!destFileName.endsWith(".bat") && sourceFile.isFile()) {
-                archiver.addFile(sourceFile, destFileName, UnixStat.DEFAULT_DIR_PERM);
+            if (sourceFile.isFile()) {
+                archiver.addFile(sourceFile, destFileName, UnixStat.DEFAULT_FILE_PERM);
             }
         }
 
-        //end workaround code
+        // add execute permissions to all non-batch files in the bin/ directory
         File bin = new File(source, "bin");
         if (bin.exists()) {
             Map<String, File> includes = IOUtil.listAllFileNames(bin);
@@ -98,6 +99,7 @@
                 }
             }
         }
+        
         archiver.createArchive();
         return dest;
     }



Mime
View raw message