annotate clover-ant.xml @ 159:0c48cfd1938b

allow projects to override branchName
author Dave Smith <smith@nwoca.org>
date Wed, 06 Nov 2013 02:13:31 +0000
parents 639bec4999f2
children
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
26
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
9 <target name="-check.clover" depends="init">
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
10 <property name="clover.jar.file" value="${user.home.ant.lib}/clover.jar"/>
25
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>
26
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
24 <if>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
25 <isset property="clover.installed"/>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
26 <then><taskdef resource="cloverlib.xml"/></then>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
27 </if>
25
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
28 </target>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
29
26
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
30 <target name="with.coverage" depends="-check.clover" if="clover.installed">
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
31
25
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
32 <property name="coverage.run.with.clover" value="true"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
33 <clover-env/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
34 <clover-clean/>
26
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
35 <clover-setup>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
36 <fileset dir="${src.dir}"/>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
37 </clover-setup>
25
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
38 <mkdir dir="${build.dir}/.clover"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
39 <mkdir dir="${build.dir}/clover"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
40 </target>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
41
26
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
42 <target name="coverage.xml" depends="-check.clover"
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
43 description="Generates an XML report to ${clover.dest}."
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
44 if="coverage.run.with.clover">
25
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
45 <clover-report>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
46 <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
47 <format type="xml"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
48 <testresults dir="build/test/results" includes="TEST-*.xml"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
49 <sourcepath>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
50 <pathelement path="${src.dir}"/>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
51 </sourcepath>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
52 </current>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
53 </clover-report>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
54 </target>
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
55
26
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
56 <target name="coverage.html" depends="-check.clover"
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
57 description="Generates an HTML report to ${clover.dest}."
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
58 if="coverage.run.with.clover">
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
59 <clover-report>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
60 <current outfile="${clover.dest}" title="${ivy.project.module}" span="${clover.span}">
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
61 <format type="html"/>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
62 <testresults dir="build/test/results" includes="TEST-*.xml"/>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
63 <sourcepath>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
64 <pathelement path="${src.dir}"/>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
65 </sourcepath>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
66 </current>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
67 </clover-report>
639bec4999f2 TL-34: Scripts for sonar integration
smith@nwoca.org
parents: 25
diff changeset
68 </target>
25
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
69
e6fd2f1eba13 add sonar with clover coverage
smith@nwoca.org
parents:
diff changeset
70 </project>