How can I use the same custom task (cobertura from Cobertura Plugin) twice, with different parameter values?

(Jonas Öhrnell) #1

I’m using Steve Saliman’s Cobertura plugin together with Sonar. Sonar needs the coverage.xml file to present coverage information, so I have to generate that file. At the same time I would like to generate HTML files with the same coverage information.

The Cobertura plugin extension allows me to select report output format: xml or html. Now, I would like to run the same task (cobertura) twice - first with the coverageFormat parameter set to ‘xml’, then with the parameter set to ‘html’.

Is there a recommended way to do this?