This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/maven-remote-resources-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new df4d256  guicify (#67)
df4d256 is described below

commit df4d256e951de41ee188b4afbbae62e8102c0064
Author: Elliotte Rusty Harold <elh...@users.noreply.github.com>
AuthorDate: Wed Dec 11 00:12:38 2024 +0000

    guicify (#67)
---
 pom.xml                                            | 12 ++++++
 .../remote/AbstractProcessRemoteResourcesMojo.java | 45 +++++++++++++---------
 .../AggregateProcessRemoteResourcesMojo.java       | 18 +++++++++
 .../remote/ProcessRemoteResourcesMojo.java         | 18 +++++++++
 4 files changed, 74 insertions(+), 19 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6ec6790..722a925 100644
--- a/pom.xml
+++ b/pom.xml
@@ -169,6 +169,12 @@ under the License.
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-xml</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.eclipse.sisu</groupId>
+      <artifactId>org.eclipse.sisu.plexus</artifactId>
+      <version>0.9.0.M2</version>
+      <scope>provided</scope>
+    </dependency>
 
     <!-- other -->
     <dependency>
@@ -176,6 +182,12 @@ under the License.
       <artifactId>velocity-engine-core</artifactId>
       <version>2.3</version>
     </dependency>
+    <dependency>
+      <groupId>javax.inject</groupId>
+      <artifactId>javax.inject</artifactId>
+      <version>1</version>
+      <scope>provided</scope>
+    </dependency>
 
     <!-- test -->
     <dependency>
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.AbstractMojo;
 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;
 
 /**
  * <p>
@@ -46,6 +53,17 @@ import org.apache.maven.project.MavenProject;
         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<Artifact> getAllDependencies() {
         LinkedHashSet<Artifact> 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;
 
 /**
  * <p>
@@ -43,6 +50,17 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
         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<Artifact> getAllDependencies() {
         return project.getArtifacts();

Reply via email to