Related with issue 32460: Improves log. Supports true, yes and on literals 3.0PR16Q2
authorAugusto Mauch <augusto.mauch@openbravo.com>
Mon, 21 Mar 2016 09:19:19 +0100
changeset 681 c204e6f0767c
parent 680 5c5e18270313
child 682 611bc1bc6cc3
Related with issue 32460: Improves log. Supports true, yes and on literals

If modulescripts are skipped, it is shown in hte log. Also now it is possible to use 'yes', 'true' and 'on' as the property value to specify that the modulescripts should be executed, as it is defined in the standard (see [1]).

[1] https://ant.apache.org/manual/develop.html
src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java
src/org/openbravo/ddlutils/task/AlterDatabaseJava.java
src/org/openbravo/ddlutils/task/ImportSampledata.java
--- a/src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java	Thu Mar 17 09:48:34 2016 +0100
+++ b/src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java	Mon Mar 21 09:19:19 2016 +0100
@@ -185,9 +185,12 @@
       platform.disableNOTNULLColumns(db, ad);
 
       if (executeModuleScripts) {
+        getLog().info("Running modulescripts...");
         // Executing modulescripts
         hd.setBasedir(new File(basedir + "/../"));
         hd.execute();
+      } else {
+        getLog().info("Skipping modulescripts...");
       }
 
       // Now we apply the configuration scripts
--- a/src/org/openbravo/ddlutils/task/AlterDatabaseJava.java	Thu Mar 17 09:48:34 2016 +0100
+++ b/src/org/openbravo/ddlutils/task/AlterDatabaseJava.java	Mon Mar 21 09:19:19 2016 +0100
@@ -41,7 +41,8 @@
       ada.setForcedRecreation(args[17]);
     }
     if (args.length > 18) {
-      ada.setExecuteModuleScripts("yes".equals(args[18]));
+      ada.setExecuteModuleScripts("yes".equals(args[18]) || "true".equals(args[18])
+          || "on".equals(args[18]));
     }
 
     ada.execute();
--- a/src/org/openbravo/ddlutils/task/ImportSampledata.java	Thu Mar 17 09:48:34 2016 +0100
+++ b/src/org/openbravo/ddlutils/task/ImportSampledata.java	Mon Mar 21 09:19:19 2016 +0100
@@ -170,6 +170,8 @@
         } catch (Exception e) {
           e.printStackTrace();
         }
+      } else {
+        log.info("Skipping modulescripts...");
       }
 
       log.info("Enabling constraints...");