Adam Murdoch wrote:
Hi,
I have just added a 'project-reports' plugin, which adds the task,
property and dependency report tasks to the project. Currently, these
tasks don't do anything different to the equivalent command-line
options, except that they write their output to a file. The plan is to
make them generate HTML reports and make them more comprehensive.
My problem is that this plugin needs a convention property which
defines the project-wide reports directory. This convention property
is also needed by the java plugin (for the junit report), and will be
needed by any other plugins we add reports to. Currently, this
property is on the java plugin convention. The project-reports plugin
cannot assume that this is present for the project, as the java plugin
may not be used.
I'm thinking of extracting a generic base plugin from the java plugin,
which both the project-reports and java plugins would extend (in the
same way the war/groovy/maven/osgi plugins extends the java plugin).
This plugin would define a small number of properties:
- reportsDir
- archiveTypes
- archivesBaseName
- distsDir
And a small number of tasks:
- clean
- init
- dists
- reports
- upload
ie the plugin would define the skeleton for a build which produces
distributions and reports, which all the other plugins can build on.
Thoughts?
Having implemented some of this and played with it a bit, I'm not sure I
like it. When you use the project-reports plugin on its own in a
project, it drags in a bunch of extra tasks and properties which don't
make any sense for the project reports. And when you use the base plugin
on its own in a project, it just doesn't do enough stuff to be worth the
effort.
I think I'll change the base plugin so that it just sets up the
reporting properties and rename it to something like ReportingBasePlugin.
I still think it would be nice to have a generic plugin which defines a
lifecycle skeleton for the project. Or even several variations which you
can select from, and which the Java plugin can decorate. But that can
wait for later.
Adam
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email