<target name="emma.reporting">
<emma enabled="true">
<report sort="+name" metrics="method:80,block:90,line:80,class:100">
<fileset dir="your/emma/dir">
<include name="*.emma" />
</fileset>
<html outfile="your/emma/dir/coverage.html" />
</report>
</emma>
</target>
<target name="emma.check">
<loadfile property="emma.output" srcFile="your/emma/dir/coverage.html" />
<fail message="Your code coverage is too low.">
<condition>
<contains string="${emma.output}" substring='class="h"' casesensitive="false" />
</condition>
</fail>
</target>