Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.3
-
None
-
Patch
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.