[ 
http://jira.codehaus.org/browse/MNG-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_98235
 ] 

Brett Porter commented on MNG-2188:
-----------------------------------

Vincent, I think your patch is correct. What the report document renderer does 
is irrelevant to clover:clover type executions. I'd suggest reopening and 
applying your own patch :)

> Report mojos should check canGenerateReport() when called directly
> ------------------------------------------------------------------
>
>                 Key: MNG-2188
>                 URL: http://jira.codehaus.org/browse/MNG-2188
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Sites & Reporting
>    Affects Versions: 2.0.3
>            Reporter: Vincent Massol
>             Fix For: 2.0.x
>
>         Attachments: AbstractMavenReport-canGenerateReport-check.patch
>
>
> There's a canGenerateReport() method in a ReportMojo. This method is called 
> by the site phase to decide if the mojo should be called or not. This is 
> cool. However the user can call directly the report mojo and in that case the 
> canGenerateReport() method is not called automatically. Thus the solution for 
> a plugin developer is to write:
> {code}
> public void executeReport()
> {
>     if (canGenerateReport() )
>     { 
>         [...]
>     }
> }
> {code}
> Which means that the canGenerateReport method is going to be called twice 
> when mvn site is executed.

-- 
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

        

Reply via email to