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 emma.properties. It could not be found.
      Test

BUILD FAILED
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 ->
<!- EMMA BEGIN ->
<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"/>
    </fileset>->
    <pathelement location="${emma.dir}" />
    <!-<pathelement location="./Program Files/Java/jre6/lib/ext/emma_ant.jar" />->
  </path>
  <taskdef resource="emma.properties" 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="au.com.jenisys.view.*"/>
    </instr>
  </emma>

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

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

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