annotate clover-ant.xml @ 25:e6fd2f1eba13

add sonar with clover coverage
author smith@nwoca.org
date Thu, 07 Apr 2011 19:14:15 -0400
parents
children 639bec4999f2
rev   line source
25
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
2 <project name="clover-project-tasks" default="" basedir="."
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
3 xmlns:ivy="antlib:fr.jayasoft.ivy.ant"
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
4 xmlns:ssdt="http://www.ssdt-ohio.org/ant/common">
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
5
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
6 <description>Clover Ant tasks</description>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
7
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
8
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
9 <target name="-check.clover">
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
10 <property name="clover.jar.file" value="${user.home.ant.lib}/clover.jar}"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
11 <property name="ssdt.clover.jar.src"
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
12 value="http://ivy.ssdt.nwoca.org/repository/clover/clover.jar"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
13 <property name="clover.dest" value="${build.dir}/clover"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
14 <ssdt:fetch dest="${clover.jar.file}"
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
15 src="${ssdt.clover.jar.src}"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
16 <property name="clover.license"
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
17 value="${user.home.ant.lib}/clover.license"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
18 <condition property="clover.installed">
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
19 <and>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
20 <available classname="com.cenqua.clover.CloverInstr" />
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
21 <available file="${clover.license}"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
22 </and>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
23 </condition>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
24 </target>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
25
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
26 <target name="with.coverage" depends="init,-check.clover" if="clover.installed">
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
27 <taskdef resource="cloverlib.xml"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
28
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
29 <property name="coverage.run.with.clover" value="true"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
30 <clover-env/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
31 <clover-setup recordTestResults="false"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
32 <clover-clean/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
33 <mkdir dir="${build.dir}/.clover"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
34 <mkdir dir="${build.dir}/clover"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
35 </target>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
36
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
37
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
38 <target name="coverage.xml" description="Generates an XML report to ${clover.dest}." if="coverage.run.with.clover">
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
39 <clover-report>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
40 <current outfile="${clover.dest}/clover.xml" title="${ivy.project.module}" span="${clover.span}">
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
41 <format type="xml"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
42 <testresults dir="build/test/results" includes="TEST-*.xml"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
43 <sourcepath>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
44 <pathelement path="${src.dir}"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
45 </sourcepath>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
46 </current>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
47 </clover-report>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
48 </target>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
49
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
50
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
51
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
52 </project>