Skip to content

Commit

Permalink
[MDEP-966] Migrate UnpackMojo from Plexus to Sisu Guice
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Nov 19, 2024
1 parent b6db6ec commit 8076a07
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
*/
package org.apache.maven.plugins.dependency.fromConfiguration;

import javax.inject.Inject;

import java.io.File;
import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
Expand All @@ -44,7 +45,6 @@
@Mojo(name = "unpack", defaultPhase = LifecyclePhase.PROCESS_SOURCES, requiresProject = false, threadSafe = true)
public class UnpackMojo extends AbstractFromConfigurationMojo {

@Component
private UnpackUtil unpackUtil;

/**
Expand Down Expand Up @@ -98,6 +98,11 @@ public class UnpackMojo extends AbstractFromConfigurationMojo {
@Parameter(property = "artifact")
private String artifact;

@Inject
public UnpackMojo(UnpackUtil unpackUtil) {
this.unpackUtil = unpackUtil;
}

/**
* Main entry into mojo. This method gets the ArtifactItems and iterates through each one passing it to
* unpackArtifact.
Expand Down

0 comments on commit 8076a07

Please sign in to comment.