Fixed issue 13241. Deployed files will now be synchronized instead of being simply copied. This will then delete files which no longer exist in the sources folder of Openbravo (such as no longer compiled classes)
authorAntonio Moreno <antonio.moreno@openbravo.com>
Fri, 11 Jun 2010 12:05:40 +0200
changeset 7595 62566014690e
parent 7594 ffad4a9982b0
child 7596 eb3434537214
Fixed issue 13241. Deployed files will now be synchronized instead of being simply copied. This will then delete files which no longer exist in the sources folder of Openbravo (such as no longer compiled classes)
src/build.xml
--- a/src/build.xml	Fri Jun 11 10:26:02 2010 +0200
+++ b/src/build.xml	Fri Jun 11 12:05:40 2010 +0200
@@ -840,13 +840,17 @@
 
   <target name="copy.files" if="mode.class">
     <mkdir dir="${jakarta.base}/webapps/${context.name}" />
-    <copy todir="${jakarta.base}/webapps/${context.name}" encoding="UTF-8">
+    <sync todir="${jakarta.base}/webapps/${context.name}">
+      <preserveintarget>
+        <include name="**/WEB-INF/classes/**"/>
+        <include name="**/WEB-INF/lib/**"/>
+      </preserveintarget>
       <fileset dir="${base.context}" />
-    </copy>
+    </sync>
     <mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/classes" />
-    <copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/classes" encoding="UTF-8">
+    <sync todir="${jakarta.base}/webapps/${context.name}/WEB-INF/classes">
       <fileset dir="${build}" />
-    </copy>
+    </sync>
     <mkdir dir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" />
       <copy todir="${jakarta.base}/webapps/${context.name}/WEB-INF/lib" file="${build.core.lib}/openbravo-core.jar" encoding="UTF-8">
     </copy>