2009/1/3 Hans Dockter <[email protected]>

>
> On Jan 3, 2009, at 1:34 AM, 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?
>>
>
> I think extracting a base plugin from the Java plugin makes a lot of sense.
> Clean and init are obvious candidates for this. The other tasks/properties
> need to be put in there because of the current state of the java plugin. It
> might turn out to be a good generic pattern. Or we might refactor it later,
> if we extract functionality from the java plugin to other plugins.
>
>
I like the idea of extracting the project level report aspect into a base
plugin. The reports task only generates the dependency report right? It
would be good I think to rename it to dependency-report or dep-report or
something. I'm assuming here that or preference for adding other reports is
adding additional tasks...

Reply via email to