geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r422565 - /geronimo/sandbox/svkmerge/m2migration/modules/system/src/java/org/apache/geronimo/system/sharedlib/SharedLib.java
Date Sun, 16 Jul 2006 23:11:47 GMT
Author: jdillon
Date: Sun Jul 16 16:11:47 2006
New Revision: 422565

URL: http://svn.apache.org/viewvc?rev=422565&view=rev
Log:
GERONIMO-2195: Create lib and classes dirs if they do not exist


Modified:
    geronimo/sandbox/svkmerge/m2migration/modules/system/src/java/org/apache/geronimo/system/sharedlib/SharedLib.java

Modified: geronimo/sandbox/svkmerge/m2migration/modules/system/src/java/org/apache/geronimo/system/sharedlib/SharedLib.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/svkmerge/m2migration/modules/system/src/java/org/apache/geronimo/system/sharedlib/SharedLib.java?rev=422565&r1=422564&r2=422565&view=diff
==============================================================================
--- geronimo/sandbox/svkmerge/m2migration/modules/system/src/java/org/apache/geronimo/system/sharedlib/SharedLib.java
(original)
+++ geronimo/sandbox/svkmerge/m2migration/modules/system/src/java/org/apache/geronimo/system/sharedlib/SharedLib.java
Sun Jul 16 16:11:47 2006
@@ -48,7 +48,9 @@
                 String classesDir = classesDirs[i];
                 File dir = serverInfo.resolve(classesDir);
                 if (!dir.exists()) {
-                    throw new IllegalArgumentException("Classes dir does not exist: " + dir);
+                    if (!dir.mkdirs()) {
+                        throw new IllegalArgumentException("Failed to create classes dir:
" + dir);
+                    }
                 }
                 if (!dir.isDirectory()) {
                     throw new IllegalArgumentException("Classes dir is not a directory: "
+ dir);
@@ -65,7 +67,9 @@
                 String libDir = libDirs[i];
                 File dir = serverInfo.resolve(libDir);
                 if (!dir.exists()) {
-                    throw new IllegalArgumentException("Lib dir does not exist: " + dir);
+                    if (!dir.mkdirs()) {
+                        throw new IllegalArgumentException("Failed to create lib dir: " +
dir);
+                    }
                 }
                 if (!dir.isDirectory()) {
                     throw new IllegalArgumentException("Lib dir is not a directory: " + dir);



Mime
View raw message