Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.3
-
Fix Version/s: 2.0.8
-
Component/s: Sites & Reporting
-
Labels:None
-
Complexity:Intermediate
-
Patch Submitted:Yes
-
Number of attachments :
Description
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:
public void executeReport() { if (canGenerateReport() ) { [...] } }
Which means that the canGenerateReport method is going to be called twice when mvn site is executed.
Patch for AbstractMavenReport to perform canGenerateReport() when it's called directly.