This is an automated email from the ASF dual-hosted git repository. hboutemy pushed a commit to branch MSHARED-1314 in repository https://gitbox.apache.org/repos/asf/maven-reporting-impl.git
commit 10ab6ed704201136a310c7003e4c21a455dfe6c0 Author: Hervé Boutemy <[email protected]> AuthorDate: Thu Oct 5 08:44:59 2023 +0200 [MSHARED-1314] mark execute() final and improve documentation --- src/it/setup-reporting-plugin/pom.xml | 3 ++- src/main/java/org/apache/maven/reporting/AbstractMavenReport.java | 4 +++- src/site/apt/index.apt.vm | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/it/setup-reporting-plugin/pom.xml b/src/it/setup-reporting-plugin/pom.xml index d85b548..4113bc4 100644 --- a/src/it/setup-reporting-plugin/pom.xml +++ b/src/it/setup-reporting-plugin/pom.xml @@ -30,7 +30,8 @@ under the License. <name>maven-reporting-impl IT: custom reporting plugin based on maven-reporting-impl</name> <description> - Demo to show how to write a reporting plugin based on maven-reporting-impl. + Demo to show how to write a reporting plugin based on maven-reporting-impl: 3 ways to write a report are provided = external (like javadoc), direct, and using a renderer. + The ITs will then test it works in the different situations that maven-reporting-impl supports: run as a goal or run as a site report. </description> <properties> diff --git a/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java b/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java index 2273196..6319511 100644 --- a/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java +++ b/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java @@ -179,12 +179,14 @@ public abstract class AbstractMavenReport extends AbstractMojo implements MavenM /** * This method is called when the report generation is invoked directly as a standalone Mojo. + * This implementation is now marked {@code final} as it is not expected to be overridden: + * {@code maven-reporting-impl} provides that plumbing. * * @throws MojoExecutionException if an error occurs when generating the report * @see org.apache.maven.plugin.Mojo#execute() */ @Override - public void execute() throws MojoExecutionException { + public final void execute() throws MojoExecutionException { try { if (!canGenerateReport()) { return; diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm index 962521d..3fd0da7 100644 --- a/src/site/apt/index.apt.vm +++ b/src/site/apt/index.apt.vm @@ -38,10 +38,13 @@ ${project.name} [] + The 2 APIs implementations are provided by <<<{{{./apidocs/org/apache/maven/reporting/AbstractMavenReport.html}AbstractMavenReport}}, + that delegates to extender <<<executeReport( Locale )>>> reporting method. + * Usage A full working sample is included in <<<maven-reporting-impl>>> ITs, which are part of - {{{../source-repository.html}the component source tree}}: see <<<src/it/setup-reporting-plugin>>>. + {{{../scm.html}the component source tree}}: see {{{https://github.com/apache/maven-reporting-impl/tree/${project.scm.tag}/src/it/setup-reporting-plugin}<<<src/it/setup-reporting-plugin>>>}}. * History
