Skip to content

Commit

Permalink
[maven] Update from component to inject per jsr330
Browse files Browse the repository at this point in the history
maven has deprecated component now.
  • Loading branch information
hazendaz committed Jan 2, 2025
1 parent d999e1d commit 4eeb705
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/net/revelc/code/formatter/FormatterMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

/**
Expand Down

0 comments on commit 4eeb705

Please sign in to comment.