diff --git a/src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java b/src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java
index e2eaa37..6767b0f 100644
--- a/src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java
+++ b/src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java
@@ -64,7 +64,6 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.resources.remote.io.xpp3.RemoteResourcesBundleXpp3Reader;
import org.apache.maven.plugin.resources.remote.io.xpp3.SupplementalDataModelXpp3Reader;
-import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.DefaultProjectBuildingRequest;
import org.apache.maven.project.MavenProject;
@@ -349,24 +348,6 @@ public abstract class AbstractProcessRemoteResourcesMojo extends AbstractMojo {
@Parameter(defaultValue = "${project.build.outputTimestamp}")
private String outputTimestamp;
- @Component
- protected RepositorySystem repoSystem;
-
- /**
- * Filtering support, for local resources that override those in the remote bundle.
- */
- @Component
- private MavenFileFilter fileFilter;
-
- @Component
- private ResourceManager locator;
-
- @Component
- private ProjectBuilder projectBuilder;
-
- @Component
- private ArtifactHandlerManager artifactHandlerManager;
-
/**
* Map of artifacts to supplemental project object models.
*/
@@ -380,6 +361,32 @@ public abstract class AbstractProcessRemoteResourcesMojo extends AbstractMojo {
private VelocityEngine velocity;
+ protected final RepositorySystem repoSystem;
+
+ /**
+ * Filtering support, for local resources that override those in the remote bundle.
+ */
+ private final MavenFileFilter fileFilter;
+
+ private final ResourceManager locator;
+
+ private final ProjectBuilder projectBuilder;
+
+ private final ArtifactHandlerManager artifactHandlerManager;
+
+ protected AbstractProcessRemoteResourcesMojo(
+ RepositorySystem repoSystem,
+ MavenFileFilter fileFilter,
+ ResourceManager locator,
+ ProjectBuilder projectBuilder,
+ ArtifactHandlerManager artifactHandlerManager) {
+ this.repoSystem = repoSystem;
+ this.fileFilter = fileFilter;
+ this.locator = locator;
+ this.projectBuilder = projectBuilder;
+ this.artifactHandlerManager = artifactHandlerManager;
+ }
+
@Override
public void execute() throws MojoExecutionException {
if (skip) {
diff --git a/src/main/java/org/apache/maven/plugin/resources/remote/AggregateProcessRemoteResourcesMojo.java b/src/main/java/org/apache/maven/plugin/resources/remote/AggregateProcessRemoteResourcesMojo.java
index 339d02a..9b5478f 100644
--- a/src/main/java/org/apache/maven/plugin/resources/remote/AggregateProcessRemoteResourcesMojo.java
+++ b/src/main/java/org/apache/maven/plugin/resources/remote/AggregateProcessRemoteResourcesMojo.java
@@ -18,14 +18,21 @@
*/
package org.apache.maven.plugin.resources.remote;
+import javax.inject.Inject;
+
import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.ProjectBuilder;
+import org.apache.maven.shared.filtering.MavenFileFilter;
+import org.codehaus.plexus.resource.ResourceManager;
+import org.eclipse.aether.RepositorySystem;
/**
*
@@ -46,6 +53,17 @@
requiresDependencyResolution = ResolutionScope.TEST,
threadSafe = true)
public class AggregateProcessRemoteResourcesMojo extends AbstractProcessRemoteResourcesMojo {
+
+ @Inject
+ public AggregateProcessRemoteResourcesMojo(
+ RepositorySystem repoSystem,
+ MavenFileFilter fileFilter,
+ ResourceManager locator,
+ ProjectBuilder projectBuilder,
+ ArtifactHandlerManager artifactHandlerManager) {
+ super(repoSystem, fileFilter, locator, projectBuilder, artifactHandlerManager);
+ }
+
@Override
protected Set getAllDependencies() {
LinkedHashSet result = new LinkedHashSet<>();
diff --git a/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java b/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
index 5c55aa5..51342e7 100644
--- a/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
+++ b/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
@@ -18,12 +18,19 @@
*/
package org.apache.maven.plugin.resources.remote;
+import javax.inject.Inject;
+
import java.util.Set;
import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.ResolutionScope;
+import org.apache.maven.project.ProjectBuilder;
+import org.apache.maven.shared.filtering.MavenFileFilter;
+import org.codehaus.plexus.resource.ResourceManager;
+import org.eclipse.aether.RepositorySystem;
/**
*
@@ -43,6 +50,17 @@
requiresDependencyResolution = ResolutionScope.TEST,
threadSafe = true)
public class ProcessRemoteResourcesMojo extends AbstractProcessRemoteResourcesMojo {
+
+ @Inject
+ public ProcessRemoteResourcesMojo(
+ RepositorySystem repoSystem,
+ MavenFileFilter fileFilter,
+ ResourceManager locator,
+ ProjectBuilder projectBuilder,
+ ArtifactHandlerManager artifactHandlerManager) {
+ super(repoSystem, fileFilter, locator, projectBuilder, artifactHandlerManager);
+ }
+
@Override
protected Set getAllDependencies() {
return project.getArtifacts();