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?

I think I have detected that the code handling report generation is in 
AbstractReportMojo.java ( 
https://github.com/jacoco/jacoco/blob/e24c99cfd568e869e53a869e99c1bc352fca4ac5/jacoco-maven-plugin/src/org/jacoco/maven/AbstractReportMojo.java
 
), more I suspect it is in *createReport* and *createVisitor* methods.

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);
}




>

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma 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/jacoco/07cc8ce2-4e3c-49cb-aa64-349500fbc696%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to