views:

37

answers:

2

Hi,

I'm trying to find a way to get this working:

I use a Hudson Continuous Integration Server where I have some Maven builds. I've configured Findbugs for these builds and also the Graph plugin that shows me the Findbugs trend. Now I've developed a maven plugin that creates an xml file with some values in it like:

<rootElement>
  <name>RootElement</name>
  <subElement>
    <name>Element1</name>
    <subValue>0.6</subValue>
  </subelement>
  <subelement>
    <name>Element2</name>
    <subValue>0.4</subValue>
  </subelement>
  <rootValue>0.5</rootValue>
</rootElement>

What I want is a kind of table with the name of the element and its value (That may be elapsed/collapsed). In Addition I want to track the trend of the values over time. Since Hudson can save build artifacts the xml of the last builds they should be easily accessed within a Hudson Plugin.

If that may not be suitable, maybe there is a possibility to use xsl templates to get a result page!?

For the charts one may also use google chart api? Any ideas or help welcome.

Kind Regards, Michael

+3  A: 

Take a look at the Plot Plugin. I haven't used it, but from the documentation, this looks like just what you want. It reads values from a Java properties file after the build finished. So you just need to convert your XML to the appropriate format, and configure the plugin to read the desired values, and it should work.

AFoglia
This really looks like what I'm searching (basically). I just missed that plugin when I had a look at the hudson plugin list...
djatomic
"So you just need to convert your XML to the appropriate format, and configure the plugin to read the desired values, and it should work."This is what I cannot find... what format does the plugin require? Anyone knows?
djatomic
I'm not a Java guy, but I believe properties is a commonly used ASCII format for Java configuration files. Wikipedia even has a page: http://en.wikipedia.org/wiki/.properties
AFoglia
@AFoglia the problem is that I need to find the way the XML resource files have to be structured :-/
djatomic
I don't think the plugin reads XML. You'll need to convert the data you currently have in XML format to the Java properties ASCII file format. So either change your maven plugin to output that, or add a step after it runs to do that conversion.
AFoglia
A: 

The Plot Plugin mentioned by @AFoglia works great for basic numeric data from each build.

For the charts one may also use google chart api?

The Plot Plugin uses its own charting. If you specifically want a google chart, your best bet is to write a script to upload the data to a google spreadsheet as part of each build.

Dave Bacher