Fixed issue 14002. Modulescripts with outdated classes won't fail.
authorAntonio Moreno <antonio.moreno@openbravo.com>
Mon, 19 Jul 2010 18:25:56 +0200
changeset 7933 8bbb4af47cd2
parent 7932 38fa897a531e
child 7934 840c40e82c78
Fixed issue 14002. Modulescripts with outdated classes won't fail.
Changed the classpath of the build.xml files so that the Java classes in the module folders are loaded first. This fixes a problem which could happen if an older version of a modulescript class used some method or class which no longer exists.
build.xml
src-db/database/build.xml
--- a/build.xml	Mon Jul 19 08:02:55 2010 +0000
+++ b/build.xml	Mon Jul 19 18:25:56 2010 +0200
@@ -190,6 +190,10 @@
   </condition>
  
   <path id="project.class.path">
+    <dirset dir="${base.modules}">
+      <include name="*/build/classes/" />
+    </dirset>
+    <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
     <pathelement path="${build}" />
     <pathelement path="${base.src}" />
     <fileset dir="${base.lib}">
@@ -213,14 +217,14 @@
     <fileset dir="${base.modules}">
       <include name="*/lib/**" />
     </fileset>
+  </path>
+
+  <!-- This classpath is needed only for the compile.apply.module task-->
+  <path id="apply.module.compile.classpath">
     <dirset dir="${base.modules}">
       <include name="*/build/classes/" />
     </dirset>
     <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
-  </path>
-
-  <!-- This classpath is needed only for the compile.apply.module task-->
-  <path id="apply.module.compile.classpath">
     <pathelement path="${build.apply.module}" />
     <pathelement path="${base.src}" />
     <fileset dir="${base.lib}">
@@ -244,14 +248,14 @@
     <fileset dir="${base.modules}">
       <include name="*/lib/**" />
     </fileset>
+  </path>
+  
+  <!-- This classpath is needed only for the apply.module task-->
+  <path id="apply.module.runtime.classpath">
     <dirset dir="${base.modules}">
       <include name="*/build/classes/" />
     </dirset>
     <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
-  </path>
-  
-  <!-- This classpath is needed only for the apply.module task-->
-  <path id="apply.module.runtime.classpath">
     <pathelement path="${build.apply.module}" />
     <pathelement path="${build}" />
     <pathelement path="${base.src}" />
@@ -276,10 +280,6 @@
     <fileset dir="${base.modules}">
       <include name="*/lib/**" />
     </fileset>
-    <dirset dir="${base.modules}">
-      <include name="*/build/classes/" />
-    </dirset>
-    <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
   </path>
   
   <macrodef name="updatesystemstatus">
--- a/src-db/database/build.xml	Mon Jul 19 08:02:55 2010 +0000
+++ b/src-db/database/build.xml	Mon Jul 19 18:25:56 2010 +0200
@@ -34,6 +34,10 @@
   </condition>
 
   <path id="runtime-classpath">
+    <dirset dir="${base.modules}">
+      <include name="*/build/classes/" />
+    </dirset>
+    <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
     <fileset dir="./lib">
       <include name="**/*.jar" />
       <exclude name="**/dbsourcemanagerlight.jar" />
@@ -42,10 +46,6 @@
     <fileset dir="${base.lib}">
       <include name="**/*.jar" />
     </fileset>
-    <dirset dir="${base.modules}">
-      <include name="*/build/classes/" />
-    </dirset>
-    <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
   </path>
 
   <taskdef name="createscript" classname="org.openbravo.ddlutils.task.CreateXML2SQL">