diff --git a/src/main/java/org/apache/maven/plugins/dependency/ListRepositoriesMojo.java b/src/main/java/org/apache/maven/plugins/dependency/ListRepositoriesMojo.java index d86c38653..38b12a84c 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/ListRepositoriesMojo.java +++ b/src/main/java/org/apache/maven/plugins/dependency/ListRepositoriesMojo.java @@ -28,6 +28,8 @@ import java.util.Set; import java.util.stream.Collectors; +import javax.inject.Inject; + import org.apache.maven.RepositoryUtils; import org.apache.maven.model.DependencyManagement; import org.apache.maven.plugin.MojoExecutionException; @@ -53,9 +55,13 @@ @Mojo(name = "list-repositories", threadSafe = true) public class ListRepositoriesMojo extends AbstractDependencyMojo { - @Component private RepositorySystem repositorySystem; + @Inject + public ListRepositoriesMojo(RepositorySystem repositorySystem) { + this.repositorySystem = repositorySystem; + } + /** * Displays a list of the repositories used by this build. *