sandeep parmar - 2011-07-14

Hello, I am new to the Hudson, emma and ant
I am getting this error while running my ant script
Started by user anonymous
$ cmd.exe /C '""C:\Program Files\apache-ant-1.8.2\bin\ant.bat" -file build.xml && exit %%ERRORLEVEL%%"'
Buildfile: C:\Learning Resource\Ant\build.xml
   Could not load definitions from resource It could not be found.

C:\Learning Resource\Ant\build.xml:22: Problem: failed to create task or type emma
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

Total time: 0 seconds
Finished: FAILURE

this is my Build.xml
<?xml version="1.0" encoding="utf-8"?>
<!- directory that contains emma.jar and emma_ant.jar ->
<project name="POC" basedir="./" xmlns:dn="antlib:org.apache.ant.dotnet">
  <property environment="env" />
  <property name="cal.basedir" location="${basedir}/../../" /> 
  <property name="emma.dir" location="${cal.basedir}/POC Softwares/Installation/Emma" />
  <property name="coverage.dir" value="${cal.basedir}/Java WorkSpace/SampleCalculator/coverage" />
  <property name="src.dir" value="${cal.basedir}/Java WorkSpace/SampleCalculator/src/"/>
  <property name="class.dir" value="${cal.basedir}/Java WorkSpace/SampleCalculator/bin/"/>
  <property name="instrumented.dir" value="${cal.basedir}/Java WorkSpace/SampleCalculator/inst/"/>
  <path id="emma.lib">
    <!-<fileset dir ="${emma.dir}" >
      <include name="*.jar"/>
    <pathelement location="${emma.dir}" />
    <!-<pathelement location="./Program Files/Java/jre6/lib/ext/emma_ant.jar" />->
  <taskdef resource="" classpathref="emma.lib" />
  <echo message="Test"></echo>

  <emma enabled="true">
    <instr instrpath="${class.dir}" destdir="${instrumented.dir}" metadatafile="${coverage.dir}/metadata.emma" merge="true">
      <filter excludes="*"/>

  <!-<target name="init" >
    <mkdir dir="${out.dir}" />
    <path id="run.classpath" >
      <pathelement location="${out.dir}" />

  <!-<target name="compile" depends="init" description="compiles the example source code" >
    <javac debug="on" srcdir="${src.dir}" destdir="${out.dir}" />
  <!-<target name="run" depends="init, compile" description="runs the examples" >
    <java classname="MyCalculator"
  <!-<emma enabled="true" >
    <report sourcepath="${src.dir}" >
      <fileset dir="${coverage.dir}" >
        <include name="*.emma" />
      <xml outfile="${coverage.dir}/coverage.xml" depth="method"/>

  <!-<target name="">->
    <emma enabled="true">
      <report sourcepath="${src.dir}" sort="+name" metrics="${emma.thresholds}">
        <fileset dir="${coverage.dir}">
          <include name="*.emma" />
          <!-<include name="*.ec" />->
        <xml outfile="${coverage.dir}/coverage.xml" depth="method" />
        <html outfile="${coverage.dir}/index.html" depth="method" columns="name, class, method, block, line" />