db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1515575 - in /db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration: DirectoryConfigurationProvider.java PackageResources.java
Date Mon, 19 Aug 2013 19:42:04 GMT
Author: tfischer
Date: Mon Aug 19 19:42:04 2013
New Revision: 1515575

URL: http://svn.apache.org/r1515575
Log:
TORQUE-296 - allow non-existence of outlets directory

Modified:
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/PackageResources.java

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java?rev=1515575&r1=1515574&r2=1515575&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/DirectoryConfigurationProvider.java
Mon Aug 19 19:42:04 2013
@@ -155,10 +155,14 @@ public class DirectoryConfigurationProvi
         List<String> result = new ArrayList<String>();
         if (!outletConfigDir.isDirectory())
         {
-            throw new ConfigurationException(
+            log.info(
                     "OutletsConfigDirectory "
                         + outletConfigDir.getAbsolutePath()
-                        + "must be a directory");
+                        + "is not a directory, "
+                        + "no outlet definitions will be read "
+                        + "(template outlets may still be available "
+                        + "through scanning the templates directory)");
+            return result;
         }
 
         File[] sourceFiles = outletConfigDir.listFiles();

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/PackageResources.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/PackageResources.java?rev=1515575&r1=1515574&r2=1515575&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/PackageResources.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/configuration/PackageResources.java
Mon Aug 19 19:42:04 2013
@@ -234,6 +234,16 @@ public class PackageResources
                     + " for files with suffix " + suffix);
         }
         final List<String> result = new ArrayList<String>();
+        if (!directoryToScan.isDirectory())
+        {
+            log.debug("Directory "
+                        + directoryToScan.getAbsolutePath()
+                        + "is not a directory, "
+                        + "no outlet definitions will be read "
+                        + "(template outlets may still be available "
+                        + "through scanning the templates directory)");
+            return result;
+        }
         String[] filenames = directoryToScan.list();
         if (filenames == null)
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message