build.xml
changeset 1977 ea57287e97c9
parent 1943 f59449272eaa
child 2005 f7317e178329
--- a/build.xml	Sun Nov 16 23:12:11 2008 +0000
+++ b/build.xml	Mon Nov 17 07:47:34 2008 +0000
@@ -100,6 +100,14 @@
 	<property name="obx.export.DB" value="false"/>
 	<property name="obx.export.CS" value="false"/>
 	
+	<condition property="mode.war">
+	  <equals arg1="war" arg2="${deploy.mode}"/>
+	</condition>
+	
+	 <condition property="mode.class">
+	    <equals arg1="class" arg2="${deploy.mode}"/>
+	  </condition>
+		
 	<condition property="apply.modules.on.create">
 		<or>
 		  <equals arg1="yes" arg2="${apply.on.create}"/>
@@ -199,14 +207,34 @@
   <target name="compile" depends="init">
     <ant dir="${base.src}" target="compile" inheritAll="true" inheritRefs="true"/>
   </target>
-
-  <target name="compile.complete.development" depends="init">
+	
+	<target name="compile.complete.deploy">
+	  <antcall target="compile.complete.development"/>
+	  <antcall target="compile.complete.war"/>
+	</target>
+	
+  <target name="compile.complete.development" depends="init" if="mode.class">
     <ant dir="${base.src}" target="compile.complete.development" inheritAll="true" inheritRefs="true"/>
   </target>
+	
+	<target name="compile.complete.war" depends="init" if="mode.war">
+	  <antcall target="compile.complete"/>
+		<antcall target="war"/>
+	</target>
 
-  <target name="compile.development" depends="init">
+	<target name="compile.deploy">
+		<antcall target="compile.war"/>
+	  <antcall target="compile.development"/>
+	</target>
+	
+  <target name="compile.development" depends="init" if="mode.class">
     <ant dir="${base.src}" target="compile.development" inheritAll="true" inheritRefs="true"/>
   </target>
+	
+	<target name="compile.war" if="mode.war">
+		<antcall target="compile"/>
+		<antcall target="war"/>
+	</target>
 
   <target name="compile.web" depends="init">
     <ant dir="${base.src}" target="compile.web" inheritAll="true" inheritRefs="true"/>
@@ -421,7 +449,7 @@
     </taskdef>
     <applyModule/>
 	</target>
-	
+		
 	<target name="apply.modules">
 	  <echo>Applying ${module} modules...</echo>
     <taskdef name="applyModule"
@@ -431,20 +459,11 @@
     <antcall target="update.database.mod"/>
     <antcall target="generate.entities"/>
     <applyModule/>
-		<antcall target="compile"/>
-		<antcall target="war"/>
+		<antcall target="compile.deploy"/>
 		<!--antcall target="deploy.context"/-->
 	</target>
-  <target name="apply.modules.development">
-    <echo>Applying ${module} modules...</echo>
-    <taskdef name="applyModule"
-             classname="org.openbravo.erpCommon.modules.ApplyModuleTask">
-      <classpath refid="project.class.path"/>
-    </taskdef>
-    <antcall target="update.database.mod"/>
-    <applyModule/>
-    <antcall target="compile.development"/>
-  </target>
+  
+	
 	<target name="tomcat.list">
 		<taskdef name="list"  classname="org.apache.catalina.ant.ListTask">
 		  <classpath refid="tomcat.classpath"/>