build.xml
changeset 7545 fe31293e17a5
parent 7541 7322f78a67ae
child 7547 064f42583bf3
equal deleted inserted replaced
7544:a5359c030fbc 7545:fe31293e17a5
    74   <property name="base.context" location="WebContent" />
    74   <property name="base.context" location="WebContent" />
    75   <property name="base.design" location="${base.context}/src-loc" />
    75   <property name="base.design" location="${base.context}/src-loc" />
    76   <property name="base.lib" location="lib" />
    76   <property name="base.lib" location="lib" />
    77   <property name="base.modules" location="modules" />
    77   <property name="base.modules" location="modules" />
    78   <property name="build" location="build/classes" />
    78   <property name="build" location="build/classes" />
       
    79   <property name="build.apply.module" location="build.apply/classes" />
    79   <property name="build.AD" location="srcAD" />
    80   <property name="build.AD" location="srcAD" />
    80   <property name="build.sqlc" location="build/javasqlc" />
    81   <property name="build.sqlc" location="build/javasqlc" />
    81   <property name="build.core.lib" location="src-core/lib" />
    82   <property name="build.core.lib" location="src-core/lib" />
    82   <property name="build.trl.lib" location="src-trl/lib" />
    83   <property name="build.trl.lib" location="src-trl/lib" />
    83   <property name="build.wad.lib" location="src-wad/lib" />
    84   <property name="build.wad.lib" location="src-wad/lib" />
   214     <dirset dir="${base.modules}">
   215     <dirset dir="${base.modules}">
   215       <include name="*/build/classes/" />
   216       <include name="*/build/classes/" />
   216     </dirset>
   217     </dirset>
   217     <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
   218     <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
   218   </path>
   219   </path>
       
   220 
       
   221   <!-- This classpath is needed only for the apply.module task-->
       
   222   <path id="apply.module.classpath">
       
   223     <pathelement path="${build.apply.module}" />
       
   224     <pathelement path="${base.src}" />
       
   225     <fileset dir="${base.lib}">
       
   226       <include name="**/*.jar" />
       
   227     </fileset>
       
   228     <fileset dir="${build.core.lib}">
       
   229       <include name="openbravo-core.jar" />
       
   230     </fileset>
       
   231     <fileset dir="${build.trl.lib}">
       
   232       <include name="openbravo-trl.jar" />
       
   233     </fileset>
       
   234     <fileset dir="${build.wad.lib}">
       
   235       <include name="openbravo-wad.jar" />
       
   236     </fileset>
       
   237     <fileset dir="${base.lib}">
       
   238       <include name="**/*.jar" />
       
   239     </fileset>
       
   240     <fileset dir="${base.db}/lib/">
       
   241       <include name="**/*.jar" />
       
   242     </fileset>
       
   243     <fileset dir="${base.modules}">
       
   244       <include name="*/lib/**" />
       
   245     </fileset>
       
   246     <dirset dir="${base.modules}">
       
   247       <include name="*/build/classes/" />
       
   248     </dirset>
       
   249     <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
       
   250   </path>
   219   
   251   
   220   <macrodef name="updatesystemstatus">
   252   <macrodef name="updatesystemstatus">
   221      <attribute name="v" default="NOT SET"/>
   253      <attribute name="v" default="NOT SET"/>
   222      <sequential>
   254      <sequential>
   223        <sql driver="${bbdd.driver}" url="${bbdd.owner.url}" userid="${bbdd.user}" password="${bbdd.password}" onerror="continue" autocommit="true">
   255        <sql driver="${bbdd.driver}" url="${bbdd.owner.url}" userid="${bbdd.user}" password="${bbdd.password}" onerror="continue" autocommit="true">
   598     <antcall target="apply.module" />
   630     <antcall target="apply.module" />
   599   </target>
   631   </target>
   600 
   632 
   601   <target name="update.database.mod" depends="init, core.lib, database.lib, buildvalidation">
   633   <target name="update.database.mod" depends="init, core.lib, database.lib, buildvalidation">
   602     <updatesystemstatus v="RB12"/>
   634     <updatesystemstatus v="RB12"/>
   603     <ant dir="${base.db}" target="update.database.mod.java" inheritAll="true" inheritRefs="true" />
   635     <!--<ant dir="${base.db}" target="update.database.mod.java" inheritAll="true" inheritRefs="true" />-->
   604     <antcall target="generate.entities.quick" />
   636     <antcall target="generate.entities.quick" />
   605     <antcall target="apply.module" />
   637     <antcall target="apply.module" />
   606   </target>
   638   </target>
   607 
   639 
   608   <target name="create.database.script" depends="init, core.lib">
   640   <target name="create.database.script" depends="init, core.lib">
   666   <target name="compile.apply.module" depends="init">
   698   <target name="compile.apply.module" depends="init">
   667     <updatesystemstatus v="RB31"/>
   699     <updatesystemstatus v="RB31"/>
   668     <ant dir="${base.src}" target="compile.apply.module" inheritAll="true" inheritRefs="true" />
   700     <ant dir="${base.src}" target="compile.apply.module" inheritAll="true" inheritRefs="true" />
   669   </target>
   701   </target>
   670   
   702   
       
   703   <!--
       
   704   This task uses a special classpath.
       
   705   This classpath is equivalent to the normal project.class.path, except for the fact that that the normal build folder
       
   706   is replaced by the apply.module.build folder, in which the ApplyModule task related classes will be compiled.
       
   707   This is done to workaround the fact that the javac task needs to compile all the related classes when upgrading openbravo
       
   708   and if the normal build folder is included, none of them are recompiled by default unless the whole build directory is specified.
       
   709   -->
   671   <target name="apply.module" depends="compile.apply.module">
   710   <target name="apply.module" depends="compile.apply.module">
   672     <java classname="org.openbravo.erpCommon.modules.ApplyModuleTask" fork="true" maxmemory="${build.maxmemory}" failonerror="true">
   711     <java classname="org.openbravo.erpCommon.modules.ApplyModuleTask" fork="true" maxmemory="${build.maxmemory}" failonerror="true">
   673       <arg line="'${base.src}'" />
   712       <arg line="'${base.src}'" />
   674       <classpath refid="project.class.path" />
   713       <classpath refid="apply.module.classpath" />
   675     </java>
   714     </java>
       
   715    <delete includeEmptyDirs="true"  dir="${build.apply.module}" />
   676   </target>
   716   </target>
   677   
   717   
   678   <target name="apply.modules.compile" depends="wad.lib">
   718   <target name="apply.modules.compile" depends="wad.lib">
   679     <antcall target="apply.modules.compile.simple"/>
   719     <antcall target="apply.modules.compile.simple"/>
   680     <antcall target="apply.modules.compile.complete"/>
   720     <antcall target="apply.modules.compile.complete"/>