diff --git a/pom.xml b/pom.xml index a2dfffa7..56c55d19 100644 --- a/pom.xml +++ b/pom.xml @@ -98,6 +98,11 @@ + + javax.inject + javax.inject + 1 + com.fasterxml.jackson.core jackson-core diff --git a/src/main/java/net/revelc/code/formatter/FormatterMojo.java b/src/main/java/net/revelc/code/formatter/FormatterMojo.java index bac9bdb9..045339d6 100644 --- a/src/main/java/net/revelc/code/formatter/FormatterMojo.java +++ b/src/main/java/net/revelc/code/formatter/FormatterMojo.java @@ -39,12 +39,13 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import javax.inject.Inject; + import org.apache.commons.lang3.StringUtils; import org.apache.maven.model.Resource; import org.apache.maven.plugin.AbstractMojo; 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; @@ -98,7 +99,7 @@ public class FormatterMojo extends AbstractMojo implements ConfigurationSource { /** * ResourceManager for retrieving the configFile resource. */ - @Component(role = ResourceManager.class) + @Inject private ResourceManager resourceManager; /**