I have been confused for a long time too, but finally had some explanations I can try to summary here: not sure it will give every answers, but at least I suppose it will help.
It has to do with the difference in API between a maven plugin (execute method from plugin-api [1]) and a reporting plugin (essentially generate method from maven-reporting-api [2]) which is in fact a m-site-p plugin, not really a Maven core plugin. Usually, you write a reporting plugin that is a Maven plugin too, but AFAIK you can write a reporting plugin that is not a Maven plugin (I didn't really tried though). Usually, nobody does that because there are drawbacks: - you can't define it in pluginManagement section (yes, it's not a Maven plugin in this case...), - maven-plugin-plugin won't generate plugin descriptor for you - you won't be able to launch the report as a maven CLI invocation Then usually, every reporting plugin is a build plugin too: for example, even if m-project-info-report-p is announced as solely reporting plugin in our plugin list, it is a build plugin too. When the reporting tool does not use site-descriptor+skin (javadoc, jxr, surefire, ...), the execute method is quite simple then it is copied in every plugin: see javadoc [3] for example When the reporting tool requires skin, the plugin invocation is harder: maven- reporting-impl tries to implement an AbstractMavenReport class [4] containing the logic for dual execution (the execute method is implemented). A lot of reporting plugins extend AbstractMavenReport. This is the summary of my understanding when I worked on maven-reporting-impl and maven-reporting-api decoupling from core. Now the consequences on execute vs reportSets. If you intend to call multiple reports when generating site, it is a site phase feature then should be configured in reporting section with reportSets. Build plugins are for maven CLI invocation, without site phase lifecycle binding. Notice that while I'm writing this now, it's the furst time I'm really understanding it :) Regards, Hervé [1] http://maven.apache.org/ref/current/maven-plugin-api/ [2] http://maven.apache.org/shared/maven-reporting-api/ [3] http://maven.apache.org/plugins/maven-javadoc- plugin/xref/org/apache/maven/plugin/javadoc/JavadocReport.html#296 [4] http://maven.apache.org/shared/maven-reporting- impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html Le mardi 23 août 2011, Benson Margulies a écrit : > I am somewhat confused by the design of the site plugin with respect > to adding additional goals. > > The new pattern is to move from 'aggregate' configuration property > booleans to more goals. However, goals have to be called out in > executions, and the reporting section can't spec an execution, and > we're moving away from the reporting section, anyway. So now you end > up with the same plugin called out as an ordinary plugin as well as in > a report, and it needs an execute method that does the same thing as > its executeReport, and both get called. > > Is there anything written down about how all this is supposed to play? > Can the site plugin be told which goal to run executeReport for, or > are these additional executions actually needed. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org