Clover XML Schema
Asked by Matt Clarkson:

Where can I find XML Schema for Clover?

I currently have the following converted from gcov:

```
&lt;clover generated="1342084368.29"&gt;&lt;project name="tool-chain-tests"&gt;&lt;package name="cxx"&gt;&lt;file name="cxx/tests/animal.cpp"&gt;&lt;line num="62" count="4" type="stmt"&gt;&lt;/line&gt;&lt;line num="64" count="2" type="stmt"&gt;&lt;/line&gt;&lt;line num="65" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="66" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="67" count="2" type="stmt"&gt;&lt;/line&gt;&lt;line num="88" count="2" type="stmt"&gt;&lt;/line&gt;&lt;line num="97" count="2" type="stmt"&gt;&lt;/line&gt;&lt;line num="98" count="2" type="stmt"&gt;&lt;/line&gt;&lt;line num="99" count="2" type="stmt"&gt;&lt;/line&gt;&lt;line num="100" count="2" type="stmt"&gt;&lt;/line&gt;&lt;line num="109" count="2" type="stmt"&gt;&lt;/line&gt;&lt;line num="110" count="2" type="stmt"&gt;&lt;/line&gt;&lt;line num="111" count="2" type="stmt"&gt;&lt;/line&gt;&lt;line num="120" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="121" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="122" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="131" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="132" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="133" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="134" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="135" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="142" count="3" type="stmt"&gt;&lt;/line&gt;&lt;/file&gt;&lt;file name="cxx/tests/main.cpp"&gt;&lt;line num="49" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="51" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="54" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="55" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="58" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="59" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="62" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="63" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="64" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="67" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="68" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="69" count="0" type="stmt"&gt;&lt;/line&gt;&lt;line num="73" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="74" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="75" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="76" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="77" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="83" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="85" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="86" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="87" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="88" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="89" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="95" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="97" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="98" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="99" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="100" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="101" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="104" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="107" count="1" type="stmt"&gt;&lt;/line&gt;&lt;line num="108" count="3" type="stmt"&gt;&lt;/line&gt;&lt;/file&gt;&lt;/package&gt;&lt;/project&gt;&lt;/clover&gt;
```

But it doesn't work in Bamboo:

```
Failed to execute plugin 'Clover Results Collector' with error: null
```


Answers:
author: Marek Parfianowicz
body: Hi Matt,

An error mentioned by you:  
`Failed to execute plugin ``'Clover Results Collector'``with error: null`  
is caused by invalid XML file format. In order to parse it correctly by 'Clover Results Collector' you must provide at least metrics at the project level. For example:  

```
&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;coverage generated="1336638030827" clover="3.1.5"&gt;  &lt;project timestamp="1336638027763"&gt;    &lt;metrics classes="0" files="1" packages="1"        loc="1000" ncloc="800"        coveredstatements="300" statements="500"        coveredmethods="50" methods="80"       coveredconditionals="100" conditionals="120"         coveredelements="900" elements="1000"       complexity="0" /&gt;  &lt;/project&gt;&lt;/coverage&gt;
```

comments: author: Matt Clarkson
body: Thanks, Marek - that is a great help. I haven't had time to look over the clover.xsd yet - been fighting fires with the Bamboo 4.1 upgrade!

This will help me along greatly!


author: Matt Clarkson
body: All fixed and integrated with Bamboo


author: Marek Parfianowicz
body: Hi Matt,

1) You can find Clover schema in Clover-for Ant (clover-ant-X.X.X.zip) zip file under /etc/clover.xsd.

2) Please note that Clover is not available on OnDemand. See [FAQ entry](https://confluence.atlassian.com/pages/viewpage.action?pageId=253231642) on confluence and [post](/questions/20099/is-the-clover-plugin-integration-available-for-bamboo-atlassian-ondemand)on [answers.atlassian.com](http://answers.atlassian.com).

Regards  
Marek


Tags: cloud