History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CC-899
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dan Rollo
Reporter: Joe Schmetzer
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
CruiseControl

AntOutputWidget to display build output

Created: 19/Mar/09 09:45 AM   Updated: 08/Sep/09 10:47 AM
Component/s: Dashboard
Affects Version/s: 2.7.2, 2.7.3, 2.8, 2.8.1, 2.8.2
Fix Version/s: 2.8.3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Text File AntOutputWidget.patch (14 kb)
2. Text File CC-899-BuildOutputWidget.patch (32 kb)
3. Text File First attempt at fixing Ant Output widget (2.7.2).txt (2 kb)

Environment: CruiseControl with Jetty


 Description  « Hide
The CC dashboard is distributed with a class called net.sourceforge.cruisecontrol.dashboard.widgets.AntOutputWidget. This class can be added to the dashboard configuration file (dashboard-config.xml), and a new tab will be displayed on the build detail tab called "Ant Output". However, currently this will only ever display the text "No information for Ant Output".

Pete Doyle created a patch to fix this, so that the widget will display the actual output from the build in a table (see attached message). This patch has been subsequently tweaked slightly by Joe Schmetzer, and is attached to this issue (see attached patch)

 All   Comments   Work Log   Change History      Sort Order:
Joe Schmetzer [19/Mar/09 10:01 AM]
I'm having the same problem as experienced by Pete Doyle (about a year ago now). I'm in a slightly different situation, in that my build is not using Ant, but rather an external build tool invoked by the CC <exec> builder. I've taken Pete's original patch, tweaked it slightly to get it to pass the checkstyle tests, and attached it to this issue.

If the CC Devs are receptive, there are a couple of other changes I would like to make:

* Change the name of the class from "AntOutputWidget" to "BuildOutputWidget" (and change the associated text on the widget tab), as this widget can handle builders other than Ant
* Make some tweaks to the XSL file so that it handles output from the <exec> builder more gracefully (for example, don't try and report the Ant version properties if they aren't available)

Joe Schmetzer [26/Mar/09 12:24 PM]
As threatened, I have tweaked my earlier patch with the following changes:
* AntOutputWidget has been renamed to BuildOutputWidget
* AntOutputWidgetTest has been renamed to BuildOutputWidgetTest
* xsl/ant.xsl has been moved to reporting/dashboard/webapp/xsl/buildoutput.xsl
* The documentation for dashboard widgets has been updated to removed the "deprecated" notice

Joe Schmetzer [26/Mar/09 12:26 PM]
Note that CC-899-BuildOutputWidget.patch replaces the original patch AntOutputWidget.patch (which can now be ignored)

Dan Rollo [28/Aug/09 03:04 AM]
Hi Joe,

I'm a dashboard neophyte, but although xsl/ant.xsl is named xsl/buildoutput.xsl now, it is still very "Ant specific", no?
One of the recurring problems with Dashboard is it assume and AntBuilder (as opposed to Maven, Exec, etc), so I'm just trying to clarify which parts are still "Ant centric" and build are truly generic "Build" in nature.
The ideal of a Builder neutral output widget may not make sense, but we should at least be clear on what parts are reusable (if any) and what parts are tightly coupled to a specific builder.

Thanks!
Dan

Joe Schmetzer [28/Aug/09 04:55 PM]
Hi Dan,

I think the widget actually *is* quite generic. As long as the builder output ends up in the CC log file under the <build> element, this widget will display something. I know that this works for the "ant" and "exec" builds, but I haven't tested it with any of the other builders. I'm assuming that they must have their build output end up in a similar place of the CC log file.

As a bit of background, I was originally using this patch to display output from the "exec" builder, which was calling out to a custom build program we were using (submitting compilation requests to a mainframe!). The developers of that system were confused by the tab label "Ant Output", but "Build Output" was much more logical to them. I have since switch to using Ant to wrap calls to the custom build tool, since I need a bit better control over input parameters. Even so, I think "Build Output" is still more understandable to the mainframe developers.

Cheers,
Joe

Dan Rollo [29/Aug/09 01:49 AM]
OK. Committed. Thanks! I was having some trouble getting svn happy with all the changes, so please let me know if I've missed anything.

Joe Schmetzer [30/Aug/09 12:57 PM]
Thanks Dan! I've tested out the changes locally on the ConnectFour project, and it appears to do what I expect.

Are you interested in another patch to add this widget to the default dashboard-config.xml?

Cheers,
Joe

Dan Rollo [08/Sep/09 10:47 AM]
Hi Joe,

Yes I'm interested! Please do submit another patch to add this widget to the default dashboard-config.xml.

Dan