[ http://jira.codehaus.org/browse/MNG-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Casey closed MNG-2188. --------------------------- Resolution: Fixed Fix Version/s: (was: 2.0.x) 2.0.8 I added this logic to the generate() method, since the execute method seems to disallow direct invocation at this point. > 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 > Assignee: John Casey > Fix For: 2.0.8 > > 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