Hi Marc!
...I can't automate with Ant, well, I can but I would increase a lot the complexity by introduce a new tool in the stack!
I've checked-out the source code and compiled by myself the 0.7.6-SNAPSHOT: I'm playing around on the plugin code and check if it is possible to extend the goal, but I lack significant background information on the project...
I could spend a little time to try and test if I can modify the plugin to customize the report, and if have success I can propose you patches.
Would you mind to help me a little bit?
Could you give me some suggestion, if you think it is possible, on how to modify these two methods in order to specify to the report to include additional classes/packages/dependencies?
Could you suggest me where to look for into the source code of the Ant Report Task to see how in Ant the ant task specify any number of classes/source file locations?
Any information or hint is precious, then I'll try to figure out by myself !
Thank you,
Cristiano
PS. Below, the code that I think handle the report generation from AbstractReportMojo.java:
void createReport(final IReportGroupVisitor visitor) throws IOException {
final FileFilter fileFilter = new FileFilter(this.getIncludes(),
this.getExcludes());
final BundleCreator creator = new BundleCreator(this.getProject(),
fileFilter, getLog());
final IBundleCoverage bundle = creator.createBundle(executionDataStore);
final SourceFileCollection locator = new SourceFileCollection(
getCompileSourceRoots(), sourceEncoding);
checkForMissingDebugInformation(bundle);
visitor.visitBundle(bundle, locator);
}
IReportVisitor createVisitor(final Locale locale) throws IOException {
final List<IReportVisitor> visitors = new ArrayList<IReportVisitor>();
getOutputDirectoryFile().mkdirs();
final XMLFormatter xmlFormatter = new XMLFormatter();
xmlFormatter.setOutputEncoding(outputEncoding);
visitors.add(xmlFormatter.createVisitor(new FileOutputStream(new File(
getOutputDirectoryFile(), "jacoco.xml"))));
final CSVFormatter csvFormatter = new CSVFormatter();
csvFormatter.setOutputEncoding(outputEncoding);
visitors.add(csvFormatter.createVisitor(new FileOutputStream(new File(
getOutputDirectoryFile(), "jacoco.csv"))));
final HTMLFormatter htmlFormatter = new HTMLFormatter();
htmlFormatter.setOutputEncoding(outputEncoding);
htmlFormatter.setLocale(locale);
visitors.add(htmlFormatter.createVisitor(new FileMultiReportOutput(
getOutputDirectoryFile())));
return new MultiReportVisitor(visitors);
}