src/build.xml
changeset 7526 ad55dd7c0779
parent 7520 896cbca4578c
parent 7386 2ccd08241915
child 7537 24cd5a49d2c5
equal deleted inserted replaced
7525:c18420217d3b 7526:ad55dd7c0779
   130 
   130 
   131   <target name="trl.clean" if="translation">
   131   <target name="trl.clean" if="translation">
   132     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
   132     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
   133       <arg line="clean '${base.config}/Openbravo.properties'" />
   133       <arg line="clean '${base.config}/Openbravo.properties'" />
   134       <classpath refid="project.class.path" />
   134       <classpath refid="project.class.path" />
   135       <sysproperty key="java.security.egd" value="${java.security.egd}"/>
       
   136     </java>
   135     </java>
   137   </target>
   136   </target>
   138   
   137   
   139   <target name="trl.remove.unused" if="translation">
   138   <target name="trl.remove.unused" if="translation">
   140     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
   139     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
   141       <arg line="remove '${base.config}/Openbravo.properties'" />
   140       <arg line="remove '${base.config}/Openbravo.properties'" />
   142       <classpath refid="project.class.path" />
   141       <classpath refid="project.class.path" />
   143       <sysproperty key="java.security.egd" value="${java.security.egd}"/>
       
   144     </java>
   142     </java>
   145   </target>
   143   </target>
   146 
   144 
   147   <target name="clean" depends="trl.clean">
   145   <target name="clean" depends="trl.clean">
   148     <property name="complete" value="true" />
   146     <property name="complete" value="true" />
   162 
   160 
   163   <target name="sqlc" depends="copy.srcClient">
   161   <target name="sqlc" depends="copy.srcClient">
   164     <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" failonerror="true">
   162     <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" failonerror="true">
   165       <arg line="'${base.config}'/Openbravo.properties .xsql . '${build.sqlc}'/src" />
   163       <arg line="'${base.config}'/Openbravo.properties .xsql . '${build.sqlc}'/src" />
   166       <classpath refid="project.class.path" />
   164       <classpath refid="project.class.path" />
   167       <sysproperty key="java.security.egd" value="${java.security.egd}"/>
       
   168     </java>
   165     </java>
   169     <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" failonerror="true">
   166     <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" failonerror="true">
   170       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src" />
   167       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src" />
   171       <jvmarg value="-Dsqlc.queryExecutionStrategy=traditional"/>
   168       <jvmarg value="-Dsqlc.queryExecutionStrategy=traditional"/>
   172       <classpath refid="project.class.path" />
   169       <classpath refid="project.class.path" />
   173       <sysproperty key="java.security.egd" value="${java.security.egd}"/>
       
   174     </java>
   170     </java>
   175     <copy file="${base.src}/buildAD.xml" tofile="${build.AD}/build.xml" />
   171     <copy file="${base.src}/buildAD.xml" tofile="${build.AD}/build.xml" />
   176     <copy file="${base.src}/log4j.lcf" tofile="${build.AD}/log4j.lcf" />
   172     <copy file="${base.src}/log4j.lcf" tofile="${build.AD}/log4j.lcf" />
   177     <ant dir="${build.AD}" target="buildAD" inheritAll="true" inheritRefs="true" />
   173     <ant dir="${build.AD}" target="buildAD" inheritAll="true" inheritRefs="true" />
   178   </target>
   174   </target>
   253     <!-- debug="true" will perform the in-memory model initialization before generating entities
   249     <!-- debug="true" will perform the in-memory model initialization before generating entities
   254 	if an error occurs then, then a stacktrace is printed. -->
   250 	if an error occurs then, then a stacktrace is printed. -->
   255     <workflow debug="false" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
   251     <workflow debug="false" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
   256       <param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
   252       <param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
   257       <param name="base.src.gen" value="${base.src.gen}" />
   253       <param name="base.src.gen" value="${base.src.gen}" />
   258       <sysproperty key="java.security.egd" value="${java.security.egd}"/>
       
   259       <classpath>
   254       <classpath>
   260         <path refid="project.class.path" />
   255         <path refid="project.class.path" />
   261       </classpath>
   256       </classpath>
   262     </workflow>
   257     </workflow>
   263 
   258 
   276       <classpath refid="project.class.path" />
   271       <classpath refid="project.class.path" />
   277     </javac>
   272     </javac>
   278   </target>
   273   </target>
   279 
   274 
   280   <target name="run.tests" depends="compileSqlc,generate.entities.quick">
   275   <target name="run.tests" depends="compileSqlc,generate.entities.quick">
       
   276     
       
   277     <copy todir="${build}">
       
   278       <fileset dir="${base.src.test}" includes="**/*.xml" />
       
   279     </copy>
       
   280     
   281     <junit printsummary="yes" haltonfailure="yes">
   281     <junit printsummary="yes" haltonfailure="yes">
   282       <classpath refid="project.class.path" />
   282       <classpath refid="project.class.path" />
   283       <formatter type="plain" usefile="no"/>
   283       <formatter type="plain" usefile="no"/>
   284       <test name="org.openbravo.test.AntTaskTests" haltonfailure="no"/>
   284       <test name="org.openbravo.test.AntTaskTests" haltonfailure="no"/>
   285     </junit>
   285     </junit>
   286   </target>
   286   </target>
   287 
   287 
   288   <target name="run.all.tests" depends="compileSqlc,generate.entities.quick">
   288   <target name="run.all.tests" depends="compileSqlc,generate.entities.quick">
       
   289     
       
   290     <copy todir="${build}">
       
   291       <fileset dir="${base.src.test}" includes="**/*.xml" />
       
   292     </copy>
       
   293 
   289     <junit printsummary="yes" haltonfailure="yes">
   294     <junit printsummary="yes" haltonfailure="yes">
   290       <classpath refid="project.class.path" />
   295       <classpath refid="project.class.path" />
   291       <formatter type="plain" usefile="no"/>
   296       <formatter type="plain" usefile="no"/>
   292       <test name="org.openbravo.test.AllAntTaskTests" haltonfailure="no" outfile="result">
   297       <test name="org.openbravo.test.AllAntTaskTests" haltonfailure="no" outfile="result">
   293 	    <formatter type="xml" />
   298 	    <formatter type="xml" />
   294 	  </test>
   299 	  </test>
   295     </junit>
   300     </junit>
   296   </target>
   301   </target>
   297 
   302 
   298   <target name="run.quick.tests" depends="compileSqlc,generate.entities.quick">
   303   <target name="run.quick.tests" depends="compileSqlc,generate.entities.quick">
       
   304     
       
   305     <copy todir="${build}">
       
   306       <fileset dir="${base.src.test}" includes="**/*.xml" />
       
   307     </copy>
       
   308     
   299     <junit printsummary="yes" haltonfailure="yes">
   309     <junit printsummary="yes" haltonfailure="yes">
   300       <classpath refid="project.class.path" />
   310       <classpath refid="project.class.path" />
   301       <formatter type="plain" usefile="no"/>
   311       <formatter type="plain" usefile="no"/>
   302       <test name="org.openbravo.test.AllQuickAntTaskTests" haltonfailure="no"/>
   312       <test name="org.openbravo.test.AllQuickAntTaskTests" haltonfailure="no"/>
   303     </junit>
   313     </junit>
   304   </target>
   314   </target>
   305 
   315 
   306   <target name="run.webservice.tests" depends="compileSqlc,generate.entities.quick">
   316   <target name="run.webservice.tests" depends="compileSqlc,generate.entities.quick">
       
   317     
       
   318     <copy todir="${build}">
       
   319       <fileset dir="${base.src.test}" includes="**/*.xml" />
       
   320     </copy>
       
   321 
   307     <junit printsummary="yes" haltonfailure="yes">
   322     <junit printsummary="yes" haltonfailure="yes">
   308       <classpath refid="project.class.path" />
   323       <classpath refid="project.class.path" />
   309       <formatter type="plain" usefile="no"/>
   324       <formatter type="plain" usefile="no"/>
   310       <test name="org.openbravo.test.AllWebserviceTests" haltonfailure="yes"/>
   325       <test name="org.openbravo.test.AllWebserviceTests" haltonfailure="yes"/>
   311     </junit>
   326     </junit>
   401   
   416   
   402   <target name="wad" depends="init, wadvalidation">
   417   <target name="wad" depends="init, wadvalidation">
   403     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}" failonerror="true">
   418     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}" failonerror="true">
   404       <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'" />
   419       <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'" />
   405       <classpath refid="project.class.path" />
   420       <classpath refid="project.class.path" />
   406       <sysproperty key="java.security.egd" value="${java.security.egd}"/>
       
   407     </java>
   421     </java>
   408     <antcall target="postwad" inheritall="true" inheritrefs="true" />
   422     <antcall target="postwad" inheritall="true" inheritrefs="true" />
   409   </target>
   423   </target>
   410 
   424 
   411   <target name="wad.quick" depends="init, wadvalidation">
   425   <target name="wad.quick" depends="init, wadvalidation">
   412     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
   426     <java classname="org.openbravo.wad.Wad" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
   413       <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'" />
   427       <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'" />
   414       <classpath refid="project.class.path" />
   428       <classpath refid="project.class.path" />
   415       <sysproperty key="java.security.egd" value="${java.security.egd}"/>
       
   416     </java>
   429     </java>
   417     <antcall target="postwad" inheritall="true" inheritrefs="true" />
   430     <antcall target="postwad" inheritall="true" inheritrefs="true" />
   418   </target>
   431   </target>
   419 
   432 
   420   <target name="postsrc" depends="postsrc.modules">
   433   <target name="postsrc" depends="postsrc.modules">
   476   <!-- FIXME: These tasks is only for development and testing purposes, remove it afterwards-->
   489   <!-- FIXME: These tasks is only for development and testing purposes, remove it afterwards-->
   477   <target name="sqlcmod" depends="copy.srcClient">
   490   <target name="sqlcmod" depends="copy.srcClient">
   478     <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" failonerror="true">
   491     <java classname="org.openbravo.data.Sqlc" fork="yes" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" failonerror="true">
   479       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src" />
   492       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' '${build.sqlc}'/src */src" />
   480       <classpath refid="project.class.path" />
   493       <classpath refid="project.class.path" />
   481       <sysproperty key="java.security.egd" value="${java.security.egd}"/>
       
   482     </java>
   494     </java>
   483   </target>
   495   </target>
   484 
   496 
   485   <target name="compileSqlcmod" depends="sqlcmod">
   497   <target name="compileSqlcmod" depends="sqlcmod">
   486     <javac srcdir="${build.sqlc}/src:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
   498     <javac srcdir="${build.sqlc}/src:${base.modules}" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on">
   745 
   757 
   746   <target name="compile.translate.modules">
   758   <target name="compile.translate.modules">
   747     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
   759     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
   748       <arg line="'${base.config}/Openbravo.properties' ${extension} '${base.modules}' '*/src'" />
   760       <arg line="'${base.config}/Openbravo.properties' ${extension} '${base.modules}' '*/src'" />
   749       <classpath refid="project.class.path" />
   761       <classpath refid="project.class.path" />
   750       <sysproperty key="java.security.egd" value="${java.security.egd}"/>
       
   751     </java>
   762     </java>
   752   </target>
   763   </target>
   753 
   764 
   754   <target name="installWebService" depends="init" if="wsdd">
   765   <target name="installWebService" depends="init" if="wsdd">
   755     <taskdef name="wsAdmin" classname="org.openbravo.erpCommon.utility.WebServiceAdmin">
   766     <taskdef name="wsAdmin" classname="org.openbravo.erpCommon.utility.WebServiceAdmin">
   771 
   782 
   772   <target name="compile.translate">
   783   <target name="compile.translate">
   773     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
   784     <java classname="org.openbravo.translate.Translate" jvm="${env.JAVA_HOME}/bin/java" fork="yes" maxmemory="${build.maxmemory}">
   774       <arg line="'${base.config}/Openbravo.properties' ${extension} '${basedir}'" />
   785       <arg line="'${base.config}/Openbravo.properties' ${extension} '${basedir}'" />
   775       <classpath refid="project.class.path" />
   786       <classpath refid="project.class.path" />
   776       <sysproperty key="java.security.egd" value="${java.security.egd}"/>
       
   777     </java>
   787     </java>
   778   </target>
   788   </target>
   779 
   789 
   780   <target name="copy.files" if="mode.class">
   790   <target name="copy.files" if="mode.class">
   781     <mkdir dir="${jakarta.base}/webapps/${context.name}" />
   791     <mkdir dir="${jakarta.base}/webapps/${context.name}" />