Fixes issue 32460:install.source can be invoked without executing modulescripts
authorAugusto Mauch <augusto.mauch@openbravo.com>
Mon, 14 Mar 2016 10:42:09 +0100
changeset 28711 8d0b0cebab04
parent 28710 daaa42c6f9e8
child 28712 330cd48c5a70
Fixes issue 32460:install.source can be invoked without executing modulescripts

A flag called execute.modulescripts has been added to allow invoking the install.source task without executing the modulescripts. Specifically the flag has been added to the impo
rt.sample.data task, which is invoked from the install.source task. The new parameter is set like this:

ant install.source -Dexecute.modulescripts=false

If the new parameter is not specified, the modulescripts will be executed by default.
build.xml
src-db/database/build.xml
src-db/database/lib/dbsourcemanager.jar
--- a/build.xml	Thu Mar 03 18:33:33 2016 +0530
+++ b/build.xml	Mon Mar 14 10:42:09 2016 +0100
@@ -732,7 +732,7 @@
     <echo message="applying modules" />    
     <antcall inheritall="true" inheritrefs="true" target="apply.module" />
 
-    <antcall target="import.sample.data" />
+    <antcall inheritall="true" target="import.sample.data" />
     <updatesystemstatus v="RB51"/> 
     <ant dir="${base.db}" target="setApplied" inheritAll="true" inheritRefs="true" />
 
--- a/src-db/database/build.xml	Thu Mar 03 18:33:33 2016 +0530
+++ b/src-db/database/build.xml	Mon Mar 14 10:42:09 2016 +0100
@@ -167,10 +167,15 @@
   </target>
 
   <target name="import.sample.data">
+    <condition property="execute.modulescripts" value="true">
+       <not>  
+          <isset property="execute.modulescripts"/>
+       </not>
+    </condition>    
     <taskdef name="importsampledata" classname="org.openbravo.ddlutils.task.ImportSampledata">
       <classpath refid="runtime-classpath" />
     </taskdef>
-    <importsampledata driver="${bbdd.driver}" url="${bbdd.owner.url}" user="${bbdd.user}" password="${bbdd.password}" verbosity="${bbdd.verbosity}" basedir="${basedir}/../../" />
+    <importsampledata driver="${bbdd.driver}" url="${bbdd.owner.url}" user="${bbdd.user}" password="${bbdd.password}" verbosity="${bbdd.verbosity}" basedir="${basedir}/../../" executeModuleScripts="${execute.modulescripts}"/>
     <antcall target="database.postupdate.${bbdd.rdbms}" />
   </target>
 
Binary file src-db/database/lib/dbsourcemanager.jar has changed