Fixed 15464: Fix updating modules having src-wad parts with internal changes
authorStefan Hühner <stefan.huehner@openbravo.com>
Thu, 16 Dec 2010 17:41:19 +0100
changeset 9092 8a2597384269
parent 9091 87f3b600c499
child 9093 37e8a6ede4c0
Fixed 15464: Fix updating modules having src-wad parts with internal changes
The excludeFilter for the src-wad parts of a module did not work correctly so
when updating a module having a src-wad which did changes its 'internal' api
between i.e. a xsql-file and a java class calling this the update process
failed it was mixing the old java class with the new version of the xsql file.
Fixed by:
- fixing exclude filter in compileSqlc task to really not module src-wad part
of a module in normal compile
- define a new minimal classpath for Wad invcocation during compilation to not
pickup those unwanted .class file even if they do exist.
- Along the way also fix excludeFilter in same location for src-util
(moduleScripts) as it was also broken
build.xml
src/build.xml
--- a/build.xml	Thu Dec 16 13:04:08 2010 +0100
+++ b/build.xml	Thu Dec 16 17:41:19 2010 +0100
@@ -208,6 +208,19 @@
     </and>
   </condition>
 
+  <!-- Minimal classpath used for executing Wad at compile time -->
+  <path id="wad.class.path">
+    <fileset dir="${base.lib}">
+      <include name="**/*.jar" />
+    </fileset>
+    <fileset dir="${build.core.lib}">
+      <include name="openbravo-core.jar" />
+    </fileset>
+    <fileset dir="${build.wad.lib}">
+      <include name="openbravo-wad.jar" />
+    </fileset>
+  </path>
+
   <path id="project.class.path">
     <dirset dir="${base.modules}">
       <include name="*/build/classes/" />
--- a/src/build.xml	Thu Dec 16 13:04:08 2010 +0100
+++ b/src/build.xml	Thu Dec 16 17:41:19 2010 +0100
@@ -369,7 +369,7 @@
   </target>
   
   <target name="compileSqlc" depends="sqlc">
-    <javac  srcdir="${basedir}:${build.sqlc}/src:${build.sqlc}/srcAD:${base.src.test}:${base.modules}" excludes="${base.modules}/*/src-wad/**,${base.modules}/*/src-util/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" nowarn="${friendlyWarnings}">
+    <javac  srcdir="${basedir}:${build.sqlc}/src:${build.sqlc}/srcAD:${base.src.test}:${base.modules}" excludes="*/src-wad/**,*/src-util/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" nowarn="${friendlyWarnings}">
       <classpath refid="project.class.path" />
     </javac>
 
@@ -453,7 +453,7 @@
   <target name="wad" depends="init, wadvalidation">
     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}" failonerror="true">
       <arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}' '${module}' 'noquick'" />
-      <classpath refid="project.class.path" />
+      <classpath refid="wad.class.path" />
       <syspropertyset>
          <propertyref name="java.security.egd" />
       </syspropertyset>
@@ -464,7 +464,7 @@
   <target name="wad.quick" depends="init, wadvalidation">
     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}' '${tab}' '${build.AD}/org/openbravo/erpWindows' '${build.AD}/org/openbravo/erpCommon' '${build.sqlc}/src' '${webTab}' '${build.AD}/org/openbravo/erpCommon/ad_actionButton' '${base.design}' '${base.translate.structure}' '${client.web.xml}' '..' '${attach.path}' '${web.url}' '${base.src}' '${complete}' '${module}' 'quick'" />
-      <classpath refid="project.class.path" />
+      <classpath refid="wad.class.path" />
       <syspropertyset>
          <propertyref name="java.security.egd" />
       </syspropertyset>