I started implementing a Maven reporting plugin as outlined in http://www.jit-consulting.de/java/jboss/maven-plugin-feat-jboss-tattletale.html to have a starting point for the discussion.
First of all I try to summarize what I did yesterday evening:
maven-tattletale-plugin is a reporting plugin bound to the site phase, so it's activated in the reporting section of the pom (see the test pom.xml in src/main/test).
You should be able to configure it within the configuration section of the plugin.
There are already some default values set (like output directory and classloader structure) which can be overridden within this configuration section.
The only thing which is required to be specified in the config section is the directory to be scanned (scanDir). blacklist is optional.
At the beginning I thought of generating XML and transform it with XSL to have the HTML pages generated (like junit does).
But with Doxia the HTML pages are automagically integrated in the generated maven site which is not if you are using an external report.
So I decided to do it all in one step using Doxia.
So far the plugin is able to generate a DependsOn report and only that. I copied&pasted some code from the Main.class. That's the point I am not happy with.
That should be refactored to use one codebase for ant and maven (like "move the Main.class code to a differently named class" or sth like that). The same applies to generating the HTML.
It's pretty much the same, but it's not equal :(. Using XML and XSLT would make it much more easier to use it in both worlds.
The next thing is implementing the different reports.
I would suggest using one Mojo per report. So we are able to configure which reports are generated as the reportname is identical to the goalname:
<reportSets> <reportSet> <configuration/> <reports> <report>dependsOn</report> <report>dependants</report> <report>...</report> </reports> </reportSet> </reportSets>