I want to generate a cobertura html report from the cobertura xml report. 
It seems that Jenkins Cobertura plugin can do this but I could not figure 
out how. I tried the following but it does only generate parts of the html 
report (taken from CoberturaPublisher.java):

Set<String> sourcePaths = new HashSet<String>();CoverageResult result = 
null;try {
    result = CoberturaCoverageParser.parse(coberturaXmlReport, null, 
sourcePaths);} catch (IOException e) {
    LOG.warn(format("Failed parse report %s", 
coberturaXmlReport.getAbsoluteFile()));}
if (result != null) {
    result.setOwner(null);
    final FilePath paintedSourcesPath = new FilePath(new 
File(destinationDir)).child("html");
    paintedSourcesPath.mkdirs();
    // Get System default encoding;
    SourceEncoding encoding = 
SourceEncoding.getEncoding(System.getProperty("file.encoding"));
    OutputStream os = new FileOutputStream("XmlToHtml.log");
    BuildListener listener = new StreamBuildListener(os);
    SourceCodePainter painter = new SourceCodePainter(paintedSourcesPath, 
sourcePaths, result.getPaintedSources(), listener, encoding);
    final FilePath moduleRoot = new FilePath(new File(destinationDir));

    moduleRoot.act(painter);}

Am I missing something?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e9727c5a-54c9-4d7a-a245-34fc0b158810%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to