Thank you for pointing out the error. I changed the jar and put the correct pat in the classpath element. Now I am getting the following error.
<project name="module" xmlns:jacoco="antlib:org.jacoco.ant">
<description>
This is the shared module for Valdi OMS project and its modules
</description>
<property name="build.sysclasspath" value="last" />
<property name="main.dir" value="src/main" />
<property name="test.dir" value="src/test" />
<property name="target.dir" value="target" />
<property name="resources.dir" value="resources" />
<property name="main.src.dir" value="${main.dir}/java" />
<property name="main.resources.dir" value="${main.dir}/resources" />
<property name="test.src.dir" value="${test.dir}/java" />
<property name="test.resources.dir" value="${test.dir}/resources" />
<property name="main.lib.dir" value="${main.dir}/lib" />
<property name="main.optional.lib.dir" value="${main.dir}/lib/optional" />
<property name="main.common.lib.dir" value="../../lib/main" />
<property name="test.lib.dir" value="${test.dir}/lib" />
<property name="test.common.lib.dir" value="../../lib/test" />
<property name="common.lib.dir" value="../../lib" />
<property name="target.classes.dir" value="${target.dir}/classes" />
<property name="main.classes.dir" value="${target.classes.dir}/main" />
<property name="main.instrumented.classes.dir" value="${target.classes.dir}/instrumented/main" />
<property name="test.classes.dir" value="${target.classes.dir}/test" />
<property name="jar.output.dir" value="${target.dir}" />
<property name="javadoc.input.dir" value="${main.dir}/doc" />
<property name="javadoc.output.dir" value="${target.dir}/doc/api" />
<property name="test.output.dir" value="${target.dir}/test" />
<property name="test.report.dir" value="${target.dir}/test/reports" />
<property name="test.coverage.report.dir" value="${target.dir}/test/coverage" />
<available file="src/main/java" property="main.java.available" />
<available file="src/main/resources" property="main.resources.available" />
<available file="src/test/java" property="test.java.available" />
<property name="src.dir" location="/src/main/java" />
<property name="result.dir" location="/target" />
<property name="result.classes.dir" location="${result.dir}/classes" />
<property name="result.report.dir" location="${result.dir}/site/jacoco" />
<property name="result.exec.file" location="${result.dir}/jacoco.exec" />
<target name="javadoc">
<description>Default javadoc target</description>
</target>
<target name="clean" description="clean files">
<delete dir="target" />
</target>
<target name="cleanjars" description="clean internal files">
<delete failonerror="false">
<fileset dir="target" includes="*.jar" erroronmissingdir="false" />
</delete>
</target>
<target name="clean.classes" description="Clean the target classes">
<delete dir="${target.classes.dir}" />
</target>
<target name="compile">
<description>Default compile target</description>
<antcall target="compile_main" />
<antcall target="compile_test" />
</target>
<target name="compile_main" if="main.java.available">
<do_compile srcref="main.src.path" classpathref="compile.classpath" output="${main.classes.dir}" />
</target>
<property name="javac.debug" value="true" />
<property name="javac.args" value="" />
<!-- =============================================================
Custom Exports
================================================================= -->
<target name="export_sources">
<description>Export source code from a module to the staging directory. The root directory should be the module base.</description>
<fileset dir="${basedir}">
<exclude name="target" />
<exclude name="target/**/*" />
<exclude name="cobertura.ser" />
</fileset>
</copy>
</target>
<target name="export_binary_src">
<description>Export source code for binaries. This is used for associating sources with class files rather than being able to build the distribution from source.</description>
<copy todir="${release.bin_src.staging.dir}" includeEmptyDirs="false">
<fileset dir="${basedir}/${main.src.dir}" />
</copy>
</target>
<target name="export_binaries">
<description>Export files for a binary release (jars, resource, javadocs) to the staging area.</description>
<copy todir="${release.bin.staging.dir}/doc/${
ant.project.name}" includeEmptyDirs="false">
<fileset dir="${target.dir}">
<include name="doc/**/*" />
</fileset>
</copy>
<copy todir="${release.bin.staging.dir}/lib/Internal" includeEmptyDirs="false">
<fileset dir="${target.dir}">
<include name="*.jar" />
</fileset>
</copy>
<copy todir="${release.bin.staging.dir}/lib/External" includeEmptyDirs="false">
<fileset dir="${main.lib.dir}">
<include name="*.jar" />
</fileset>
</copy>
<copy todir="${release.bin.staging.dir}/resources" includeEmptyDirs="false">
<fileset dir="${resources.dir}" includes="**/*" />
</copy>
</target>
<target name="export_test_results" if="run.tests">
<description>Export all the test results into a single location to create a single report</description>
<copy todir="${release.testresults.staging.dir}/junit" includeEmptyDirs="false">
<fileset dir="${test.output.dir}/junit">
</fileset>
</copy>
</target>
<!--=============================================================
Compile
================================================================= -->
<macrodef name="do_compile">
<attribute name="srcref" />
<attribute name="classpathref" />
<attribute name="output" />
<sequential>
<mkdir dir="@{output}" />
<javac destdir="@{output}" debug="${javac.debug}" memoryMaximumSize="1024m" fork="yes" nowarn="yes">
<compilerarg line="${javac.args}" />
<classpath refid="@{classpathref}" />
<src refid="@{srcref}" />
</javac>
</sequential>
</macrodef>
<!--=============================================================
Run Tests
================================================================= -->
<property name="junit.fork.dir" value="${basedir}" />
<property name="junit.output.dir" value="${target.dir}/test/junit" />
<property name="junit.haltonfailure" value="false" />
<target name="test" description="run all tests, if needed" depends="check.tests.run" if="tests.run">
<antcall target="test.clean" />
<antcall target="test.compile" />
<!-- <antcall target="test.instrument" /> -->
<antcall target="test.unit" />
<antcall target="test.report" />
<antcall target="test.coverage" />
</target>
<target name="test.compile" depends="compile" description="compile the test sources">
<mkdir dir="${test.classes.dir}" />
<antcall target="compile_test" />
</target>
<target name="compile_test" if="test.java.available">
<do_compile srcref="test.src.path" classpathref="test.compile.classpath" output="${test.classes.dir}" />
</target>
<target name="test.clean" description="Clean test output, forces tests to be run." unless="tests.uptodate">
<delete dir="${test.output.dir}" />
<delete dir="${main.instrumented.classes.dir}" />
<delete file="cobertura.ser" />
</target>
<target name="test.report" unless="tests.uptodate">
<description>Generate the test reports</description>
<delete dir="${test.report.dir}/reports" />
<junitreport todir="${test.report.dir}">
<fileset dir="${junit.output.dir}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${test.report.dir}/reports" />
</junitreport>
</target>
<target name="check.tests.run" depends="check.tests.uptodate">
<description>Check if utest or atest timestamps are older than the QFJ classes and test needs to be run</description>
<condition property="tests.run">
<and>
<not>
<isset property="tests.uptodate" />
</not>
<isset property="run.tests" />
</and>
</condition>
</target>
<target name="check.tests.uptodate" depends="check.utests.uptodate">
<description>Check if utest or atest timestamps are older than the QFJ classes</description>
<condition property="tests.uptodate">
<and>
<isset property="utests.uptodate" />
</and>
</condition>
</target>
<target name="test.init">
<mkdir dir="${test.output.dir}/junit" />
<mkdir dir="${test.output.dir}/reports" />
</target>
<target name="check.utests.uptodate">
<description>Check if any classes are newer than the timestamp file</description>
<uptodate property="utests.uptodate" targetfile="${utest.timestamp}">
<srcfiles dir="${main.classes.dir}" includes="**/*" />
</uptodate>
</target>
<property name="utest.fork" value="yes" />
<property name="utest.timestamp" value="${target.dir}/test/.utest_timestamp" />
<target name="test.unit" description="run unit tests" depends="check.utests.uptodate,test.unit.junit" unless="utests.failed">
<description>Update test timestamp if tests passed.</description>
<touch file="${utest.timestamp}" />
</target>
<target name="test.unit.junit" />
<!--=============================================================
Tests Coverage Report
================================================================= -->
<!--
<path id="cobertura.classpath" description="CoberTura tool path">
<fileset dir="${test.common.lib.dir}">
<include name="cobertura*.jar" />
<include name="log4j*.jar" />
<include name="asm*.jar" />
<include name="jakarta-oro*.jar" />
</fileset>
</path>
<taskdef classpath="cobertura.jar" resource="tasks.properties" classpathref="cobertura.classpath"/>
<target name="test.instrument">
<cobertura-instrument todir="${main.instrumented.classes.dir}">
<fileset dir="${main.classes.dir}">
<include name="**/*.class"/>
</fileset>
</cobertura-instrument>
</target>
<target name="test.coverage">
<cobertura-report srcdir="${main.src.dir}" destdir="${test.coverage.report.dir}"/>
</target>
-->
<!-- Step 1: Import JaCoCo Ant tasks -->
<taskdef resource="net/sf/antcontrib/antlib.xml"/>