[DynamicRebuildWindow] Fixed classpath problem in classes which use reflection
authorAntonio Moreno <antonio.moreno@openbravo.com>
Thu, 03 Jun 2010 19:31:37 +0200
changeset 7543 064f42583bf3
parent 7542 5ccd207918d2
child 7544 caa69e8cda52
[DynamicRebuildWindow] Fixed classpath problem in classes which use reflection
build.xml
src/build.xml
--- a/build.xml	Thu Jun 03 18:43:05 2010 +0200
+++ b/build.xml	Thu Jun 03 19:31:37 2010 +0200
@@ -218,9 +218,41 @@
     <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}">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${build.core.lib}">
+      <include name="openbravo-core.jar" />
+    </fileset>
+    <fileset dir="${build.trl.lib}">
+      <include name="openbravo-trl.jar" />
+    </fileset>
+    <fileset dir="${build.wad.lib}">
+      <include name="openbravo-wad.jar" />
+    </fileset>
+    <fileset dir="${base.lib}">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${base.db}/lib/">
+      <include name="**/*.jar" />
+    </fileset>
+    <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>
+  
   <!-- This classpath is needed only for the apply.module task-->
-  <path id="apply.module.classpath">
+  <path id="apply.module.runtime.classpath">
     <pathelement path="${build.apply.module}" />
+    <pathelement path="${build}" />
     <pathelement path="${base.src}" />
     <fileset dir="${base.lib}">
       <include name="**/*.jar" />
@@ -710,7 +742,7 @@
   <target name="apply.module" depends="compile.apply.module">
     <java classname="org.openbravo.erpCommon.modules.ApplyModuleTask" fork="true" maxmemory="${build.maxmemory}" failonerror="true">
       <arg line="'${base.src}'" />
-      <classpath refid="apply.module.classpath" />
+      <classpath refid="apply.module.runtime.classpath" />
     </java>
    <delete includeEmptyDirs="true"  dir="${build.apply.module}" />
   </target>
--- a/src/build.xml	Thu Jun 03 18:43:05 2010 +0200
+++ b/src/build.xml	Thu Jun 03 19:31:37 2010 +0200
@@ -169,7 +169,7 @@
       <src path="${base.src}"/>
       <src path="../build/javasqlc/src"/>
       <src path="../src-gen"/>
-      <classpath refid="apply.module.classpath" />
+      <classpath refid="apply.module.compile.classpath" />
     </javac>
   </target>