[ http://jira.codehaus.org/browse/MNG-469?page=comments#action_41544 ] 

John Casey commented on MNG-469:
--------------------------------

I've been thinking about the fact that reports can be called from both the site 
mojo OR directly from the command line...

If we're going to support the command line, it would seem that we'll have to 
tell the difference between a report and a regular plugin, to determine where 
to pull the POM config from. Additionally, the site mojo is invoked from the 
lifecycle executor. This leads me to believe that we could have another method 
on the lifecycle executor that acts like:

processPluginConfiguration(..)

except instead of traversing the <plugins/> section to extract the 
configuration, we'd be traversing the <reporting/> section (replacement for 
<reports/> since there was a naming collision). In both cases we're creating a 
new mapping object that contains the configs for the plugin/reporter level, the 
execution/reportSet level, and the mojoDescriptor used to lookup the mojo for 
execution.

Once we've processed the reporting section, invoking a report would be just 
like invoking any other mojo...the only trick will be invoking a set of reports 
from the site plugin, which will act like a macro for reports, if I understand 
correctly.

WDYT?

> implement report configuration
> ------------------------------
>
>          Key: MNG-469
>          URL: http://jira.codehaus.org/browse/MNG-469
>      Project: Maven 2
>         Type: Bug
>   Components: maven-reports
>     Versions: 2.0-alpha-2
>     Reporter: Brett Porter
>     Assignee: John Casey
>      Fix For: 2.0-alpha-3

>
>
> notes:
> - if in <reports> the configuration applies to the report, which may be 
> different to the mojo in <build/> if the plugin is executed there. So we need 
> that separate section.
> - currently, the report is not configured at all, as we use a map lookup
> implementation:
> - similar to executeMojo, a getReport method should get a configured 
> MavenReport
> - remove the MavenConfiguration inline with this, AbstractMavenReport should 
> have a outputDirectory and project field. due to the way locales are done, 
> this will moving the output directory creation into the abstract report where 
> it can concat the locale
> - reports should be configured from the <reports/> whether they are being 
> executed or as part of the site, not in <build/> like normal plugins
> - design as shown here:  
> http://docs.codehaus.org/display/MAVEN/Multiple+Goal+Declaration, ie:
> <report>
>  <g/a/v>
>  <configuration />
>  <reportSets>
>    <reportSet>
>      <id />
>      <configuration />
>      <reports>
>        <report>...</report>
>        <report>...</report>
>      </reports>
>    </reportSet>
>  </reportSets>
> </report>
>     

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to