=== modified file 'build.xml'
--- old/build.xml	2025-05-23 00:00:22 +0000
+++ new/build.xml	2025-06-12 10:38:42 +0000
@@ -1,4 +1,4 @@
-<project name="hotel" default="dist" basedir=".">
+<project name="hotel" default="dist" basedir="." xmlns:if="ant:if">
 
    <description>Hotel Management</description>
 
@@ -70,6 +70,8 @@
    <property name="deploy.home.abs"      location="${deploy.home}" />
    <property name="rpt.home"             value="${basedir}/rpt" />
    <property name="cg.home"              value="${basedir}/callgraph" />
+
+   <property name="jacoco.exec"          value="${basedir}/coverage/jacoco.exec"/>
    
    <!-- enable database type(s) -->
    <property name="db.h2"                value="true" /> <!-- default, if none specified in build.properties -->
@@ -151,6 +153,29 @@
       <format property="LOG_STAMP" pattern="yyyyMMdd_HHmmss" />
    </tstamp>
 
+   <target name="init-jacoco">
+      <taskdef if:set="coverage" name="jacocoagent" classname="org.jacoco.ant.AgentTask">
+         <classpath>
+            <pathelement location="${deploy.home}/lib/org.jacoco.ant-0.8.13.jar"/>
+            <pathelement location="${deploy.home}/lib/org.jacoco.core-0.8.13.jar"/>
+            <pathelement location="${deploy.home}/lib/org.jacoco.agent-0.8.13.jar"/>
+         </classpath>
+      </taskdef>
+
+      <taskdef if:set="coverage" name="jacocoreport" classname="org.jacoco.ant.ReportTask">
+         <classpath>
+            <pathelement location="${deploy.home}/lib/org.jacoco.ant-0.8.13.jar"/>
+            <pathelement location="${deploy.home}/lib/org.jacoco.core-0.8.13.jar"/>
+            <pathelement location="${deploy.home}/lib/org.jacoco.report-0.8.13.jar"/>
+            <fileset dir="${deploy.home}/lib">
+               <include name="asm*9.8.jar"/>
+            </fileset>
+         </classpath>
+      </taskdef>
+
+      <jacocoagent if:set="coverage" property="agentvmparam" destfile="${jacoco.exec}"/>
+   </target>
+
    <!-- create the time stamp -->
    <target name="init" depends="check.fwd.dir">
       <tstamp/>
@@ -321,9 +346,30 @@
       <record name="cvt_${LOG_STAMP}.log" action="stop"/>
    </target>
 	
+   <target name="coverage-report">
+      <jacocoreport>
+         <executiondata>
+            <file file="${jacoco.exec}"/>
+         </executiondata>
+         <structure name="JaCoCo Report">
+            <classfiles>
+               <fileset dir="${fwd.build.home}/classes/com/goldencode/p2j">
+                  <include name="**/*.class"/>
+               </fileset>
+            </classfiles>
+            <sourcefiles encoding="UTF-8">
+               <fileset dir="${fwd.src.home}">
+                  <include name="**/*.java"/>
+               </fileset>
+            </sourcefiles>
+         </structure>
+         <html destdir="coverage"/>
+      </jacocoreport>
+   </target>
+
    <!-- convert 4GL code from ${app.4gl.src} into ${src}, using a fileset -->
    <target name="convert.zset"
-           depends="init, check-zfile-set"
+           depends="init-jacoco, init, check-zfile-set"
            description="Convert the 4GL source code to Java source code, using the z-file set file as input."
            if="zfile-set">
       <record name="cvt_${LOG_STAMP}.log" action="start"/>
@@ -332,6 +378,7 @@
             fork="true"
             failonerror="true"
             dir="${basedir}">
+         <jvmarg if:set="coverage" value="${agentvmparam}"/>
          <jvmarg value="-server"/>
          <jvmarg value="-Xmx${conversionHeap}"/>
          <jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
@@ -342,6 +389,7 @@
          <classpath refid="compile.classpath"/>
       </java>
       <record name="cvt_${LOG_STAMP}.log" action="stop"/>
+      <antcall if:set="coverage" target="coverage-report"/>
    </target>
    
    <target name="convert.front" 
@@ -836,8 +884,9 @@
            description="Deploys the generated jars for the application (not FWD) by copying them to the location expected by the runtime scripts." >
            
       <!-- copy the required jars to the distribution directory -->
-      <copy file="${build.home}/lib/${appname}.jar" todir="${deploy.home}/lib"/>      
+      <copy file="${build.home}/lib/${appname}.jar" todir="${deploy.home}/lib" failonerror="false"/>      
    </target>
+
    <target name="deployapp.prepare.java8" unless="java_11_spi"
            description="Deploys the FWD *and* generated jars by copying them to the location expected by the runtime scripts, Java 8 version." >
            

