25
|
1 <?xml version="1.0" encoding="UTF-8"?>
|
|
2 <project name="clover-project-tasks" default="" basedir="."
|
|
3 xmlns:ivy="antlib:fr.jayasoft.ivy.ant"
|
|
4 xmlns:ssdt="http://www.ssdt-ohio.org/ant/common">
|
|
5
|
|
6 <description>Clover Ant tasks</description>
|
|
7
|
|
8
|
26
|
9 <target name="-check.clover" depends="init">
|
|
10 <property name="clover.jar.file" value="${user.home.ant.lib}/clover.jar"/>
|
25
|
11 <property name="ssdt.clover.jar.src"
|
|
12 value="http://ivy.ssdt.nwoca.org/repository/clover/clover.jar"/>
|
|
13 <property name="clover.dest" value="${build.dir}/clover"/>
|
|
14 <ssdt:fetch dest="${clover.jar.file}"
|
|
15 src="${ssdt.clover.jar.src}"/>
|
|
16 <property name="clover.license"
|
|
17 value="${user.home.ant.lib}/clover.license"/>
|
|
18 <condition property="clover.installed">
|
|
19 <and>
|
|
20 <available classname="com.cenqua.clover.CloverInstr" />
|
|
21 <available file="${clover.license}"/>
|
|
22 </and>
|
|
23 </condition>
|
26
|
24 <if>
|
|
25 <isset property="clover.installed"/>
|
|
26 <then><taskdef resource="cloverlib.xml"/></then>
|
|
27 </if>
|
25
|
28 </target>
|
|
29
|
26
|
30 <target name="with.coverage" depends="-check.clover" if="clover.installed">
|
|
31
|
25
|
32 <property name="coverage.run.with.clover" value="true"/>
|
|
33 <clover-env/>
|
|
34 <clover-clean/>
|
26
|
35 <clover-setup>
|
|
36 <fileset dir="${src.dir}"/>
|
|
37 </clover-setup>
|
25
|
38 <mkdir dir="${build.dir}/.clover"/>
|
|
39 <mkdir dir="${build.dir}/clover"/>
|
|
40 </target>
|
|
41
|
26
|
42 <target name="coverage.xml" depends="-check.clover"
|
|
43 description="Generates an XML report to ${clover.dest}."
|
|
44 if="coverage.run.with.clover">
|
25
|
45 <clover-report>
|
|
46 <current outfile="${clover.dest}/clover.xml" title="${ivy.project.module}" span="${clover.span}">
|
|
47 <format type="xml"/>
|
|
48 <testresults dir="build/test/results" includes="TEST-*.xml"/>
|
|
49 <sourcepath>
|
|
50 <pathelement path="${src.dir}"/>
|
|
51 </sourcepath>
|
|
52 </current>
|
|
53 </clover-report>
|
|
54 </target>
|
|
55
|
26
|
56 <target name="coverage.html" depends="-check.clover"
|
|
57 description="Generates an HTML report to ${clover.dest}."
|
|
58 if="coverage.run.with.clover">
|
|
59 <clover-report>
|
|
60 <current outfile="${clover.dest}" title="${ivy.project.module}" span="${clover.span}">
|
|
61 <format type="html"/>
|
|
62 <testresults dir="build/test/results" includes="TEST-*.xml"/>
|
|
63 <sourcepath>
|
|
64 <pathelement path="${src.dir}"/>
|
|
65 </sourcepath>
|
|
66 </current>
|
|
67 </clover-report>
|
|
68 </target>
|
25
|
69
|
|
70 </project>
|