[ref] wad.lib needs to be executed after update.database
authorAsier Lostalé <asier.lostale@openbravo.com>
Thu, 04 Feb 2010 09:04:25 +0100
changeset 6221 5e9fcccf8e4a
parent 6220 cc042170018b
child 6222 a776616a44a7
[ref] wad.lib needs to be executed after update.database
build.xml
src/org/openbravo/erpCommon/ad_process/ApplyModules.java
--- a/build.xml	Wed Feb 03 12:11:25 2010 +0100
+++ b/build.xml	Thu Feb 04 09:04:25 2010 +0100
@@ -630,7 +630,7 @@
     </java>
   </target>
   
-  <target name="apply.modules.compile">
+  <target name="apply.modules.compile" depends="wad.lib">
     <antcall target="apply.modules.compile.simple"/>
     <antcall target="apply.modules.compile.complete"/>
   </target>
--- a/src/org/openbravo/erpCommon/ad_process/ApplyModules.java	Wed Feb 03 12:11:25 2010 +0100
+++ b/src/org/openbravo/erpCommon/ad_process/ApplyModules.java	Thu Feb 04 09:04:25 2010 +0100
@@ -252,9 +252,6 @@
         tasks.add("compile.complete.deploy");
         ant.setProperty("apply.on.create", "true");
       } else {
-        if (isWadLibNeeded(sourcePath)) {
-          tasks.add("wad.lib");
-        }
         if (ApplyModulesData.compileCompleteNeeded(this)) {
           // compile complete is needed for templates because in this case it is not needed which
           // elements belong to the template and for uninistalling modules in order to remove old
@@ -309,30 +306,6 @@
   }
 
   /**
-   * Checks whether WAD needs to be rebuilt. It is needed to rebuild WAD in case the modules to be
-   * applied have sources to be included in openbravo-wad.jar, this is when they have code in
-   * src-wad directory.
-   * 
-   * @param sourcePath
-   *          Root directory for Openbravo instance
-   * @return true if wad needs to be rebuilt
-   */
-  private boolean isWadLibNeeded(String sourcePath) {
-    try {
-      ApplyModulesData[] data = ApplyModulesData.selectUnappliedModules(this);
-      for (ApplyModulesData mod : data) {
-        File f = new File(sourcePath + "/modules/" + mod.name + "/src-wad");
-        if (f.exists()) {
-          return true;
-        }
-      }
-    } catch (Exception e) {
-      log4j.error("Error", e);
-    }
-    return false;
-  }
-
-  /**
    * Creates a new module log entry for a build with the action set to B and no module information
    * set.
    *