This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch guice in repository https://gitbox.apache.org/repos/asf/maven-reporting-impl.git
commit a43342c05841e495f9293b2a72dfd13945923e18 Author: Elliotte Rusty Harold <elh...@ibiblio.org> AuthorDate: Wed Nov 27 19:03:03 2024 -0500 Remove @Component, rely on constructor injection in subclasses instead --- .../maven/reporting/AbstractMavenReport.java | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java b/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java index 2001157..e6bf326 100644 --- a/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java +++ b/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java @@ -47,7 +47,6 @@ import org.apache.maven.model.Reporting; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import org.apache.maven.shared.utils.WriterFactory; @@ -156,18 +155,6 @@ public abstract class AbstractMavenReport extends AbstractMojo implements MavenM @Parameter(defaultValue = "${project.build.outputTimestamp}") protected String outputTimestamp; - /** - * SiteTool. - */ - @Component - protected SiteTool siteTool; - - /** - * Doxia Site Renderer component. - */ - @Component - protected Renderer siteRenderer; - /** The current sink to use */ private Sink sink; @@ -183,9 +170,24 @@ public abstract class AbstractMavenReport extends AbstractMojo implements MavenM @Parameter(property = "output.format") protected String outputFormat; - @Component private PlexusContainer container; + /** + * SiteTool. + */ + protected SiteTool siteTool; + + /** + * Doxia Site Renderer component. + */ + protected Renderer siteRenderer; + + public AbstractMavenReport(PlexusContainer container, SiteTool siteTool, Renderer siteRenderer) { + this.container = container; + this.siteTool = siteTool; + this.siteRenderer = siteRenderer; + } + /** * 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: