Ah, it wasn't clear from you original mail that you are talking about
report plugins.
Manos Batsis schrieb:
Manos Batsis wrote:
According to the documentation, this seems irrelevant to my original
question, which is, how to make reporting mojo execution optional,
i.e. not happen unless the user specifies an execution for it.
Maybe i need to override canGenerateReport[1] for this and try to figure
out if an execution exists from there?
canGenerateReport() is meant to give feedback if a report is able to
render itself in the current context. The reports that can not render
themself are filtered out here [1] in filterReports(). So yes, you can
use it to disable reports.
The proper way of excluding certain reports from rendering is however,
to specify a <reportSet> configuration in the plugin configuration. See
the example in the project-info-reports [2].
-Tim
[1]
https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractSiteRenderingMojo.java
[2]
http://maven.apache.org/plugins/maven-project-info-reports-plugin/examples/selective-project-info-reports.html
[1]
http://maven.apache.org/ref/current/maven-reporting/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html#canGenerateReport()
Thanks,
Manos
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]