Skip to content

Commit a9dd079

Browse files
authored
@component --> @Inject for DisplayAncestorsMojo (#474)
1 parent c6528a9 commit a9dd079

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/org/apache/maven/plugins/dependency/DisplayAncestorsMojo.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818
*/
1919
package org.apache.maven.plugins.dependency;
2020

21+
import javax.inject.Inject;
22+
2123
import java.util.ArrayList;
2224
import java.util.List;
2325

2426
import org.apache.maven.plugin.AbstractMojo;
2527
import org.apache.maven.plugin.MojoExecutionException;
2628
import org.apache.maven.plugin.MojoFailureException;
27-
import org.apache.maven.plugins.annotations.Component;
2829
import org.apache.maven.plugins.annotations.LifecyclePhase;
2930
import org.apache.maven.plugins.annotations.Mojo;
3031
import org.apache.maven.project.MavenProject;
@@ -39,12 +40,13 @@
3940
@Mojo(name = "display-ancestors", threadSafe = true, requiresProject = true, defaultPhase = LifecyclePhase.VALIDATE)
4041
public class DisplayAncestorsMojo extends AbstractMojo {
4142

42-
/**
43-
* POM
44-
*/
45-
@Component
4643
private MavenProject project;
4744

45+
@Inject
46+
public DisplayAncestorsMojo(MavenProject project) {
47+
this.project = project;
48+
}
49+
4850
@Override
4951
public void execute() throws MojoExecutionException, MojoFailureException {
5052
final List<String> ancestors = collectAncestors();

0 commit comments

Comments
 (0)