fixed bug 0009205: smartbuild compiles all windows when it is not needed
authorAsier Lostalé <asier.lostale@openbravo.com>
Fri, 09 Oct 2009 17:16:25 +0200
changeset 5216 2685893c3239
parent 5215 34c4a57ded90
child 5217 c5b024720ede
fixed bug 0009205: smartbuild compiles all windows when it is not needed
build.xml
src-core/src/org/openbravo/utils/CheckSum.java
--- a/build.xml	Fri Oct 09 16:01:29 2009 +0200
+++ b/build.xml	Fri Oct 09 17:16:25 2009 +0200
@@ -209,6 +209,10 @@
   </path>
 
   <taskdef resource="axis-tasks.properties" classpathref="project.class.path" />
+  
+  <taskdef name="CheckSumCondition" classname="org.openbravo.utils.CheckSumCondition">
+    <classpath refid="project.class.path" />
+  </taskdef>
 
   <target name="init" depends="code.rev">
     <fail if="no.java.home" message="The environment variable JAVA_HOME is not set." />
@@ -244,13 +248,13 @@
     <antcall target="update.database.if.no.local" />
     
     <antcall target="wad.lib" />
-
-    <checksum file="${base.src.wad}/lib/openbravo-wad.jar" algorithm="MD5" property="test.md5.wad" />
+    
+    <CheckSumCondition obDir="${basedir}"
+                       type="md5.wad"
+                       property="test.md5.wad"/>
 
     <condition property="new.wad">
-      <not>
-        <equals arg1="${test.md5.wad}" arg2="${md5.wad}" />
-      </not>
+        <istrue value="${test.md5.wad}"/>
     </condition>
 
     <antcall target="trl.lib" />
@@ -297,6 +301,11 @@
   <target name="compile.complete.deploy">
     <antcall target="compile.complete.development" />
     <antcall target="compile.complete.war" />
+    
+    <!-- Calculate wad checksum to enable smartbuild-->
+    <CheckSumCondition obDir="${basedir}"
+                           type="md5.wad"
+                           property="test.md5.wad"/>
   </target>
 
   <target name="compile.complete.development" depends="init" if="mode.class">
--- a/src-core/src/org/openbravo/utils/CheckSum.java	Fri Oct 09 16:01:29 2009 +0200
+++ b/src-core/src/org/openbravo/utils/CheckSum.java	Fri Oct 09 17:16:25 2009 +0200
@@ -89,7 +89,7 @@
       String rt[] = { obDir + "src-db/database/sourcedata", obDir + "modules" };
       return rt;
     } else if (type.equals("md5.wad")) {
-      String rt[] = { obDir + "src-wad/lib/openbravo-wad.jar" };
+      String rt[] = { obDir + "src-wad/src" };
       return rt;
     } else if (type.equals("md5.skins")) {
       String rt[] = { obDir + "web/skins" };