Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change @Component to Guice @Inject #60

Merged
merged 2 commits into from
Dec 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions src/main/java/org/apache/maven/reporting/AbstractMavenReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package org.apache.maven.reporting;

import javax.inject.Inject;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
Expand Down Expand Up @@ -47,7 +49,6 @@
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;
Expand Down Expand Up @@ -156,18 +157,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;

Expand All @@ -183,9 +172,21 @@ public abstract class AbstractMavenReport extends AbstractMojo implements MavenM
@Parameter(property = "output.format")
protected String outputFormat;

@Component
@Inject
private PlexusContainer container;

/**
* SiteTool.
*/
@Inject
protected SiteTool siteTool;

/**
* Doxia Site Renderer component.
*/
@Inject
protected Renderer 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:
Expand Down
Loading