diff --git a/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/AbstractTransformerMojo.java b/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/AbstractTransformerMojo.java index 9f561b30..4239016e 100644 --- a/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/AbstractTransformerMojo.java +++ b/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/AbstractTransformerMojo.java @@ -19,7 +19,6 @@ import org.apache.maven.plugin.MojoExecution; 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.Parameter; import org.apache.maven.project.MavenProject; import org.eclipse.transformer.AppOption; @@ -32,6 +31,8 @@ import org.slf4j.LoggerFactory; import org.sonatype.plexus.build.incremental.BuildContext; +import javax.inject.Inject; + /** * Base Mojo class. */ @@ -72,7 +73,7 @@ public abstract class AbstractTransformerMojo extends AbstractMojo { @Parameter(property = "transform.skip", defaultValue = "false") private boolean skip; - @Component + @Inject private BuildContext buildContext; public boolean skip() { diff --git a/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/TransformerJarMojo.java b/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/TransformerJarMojo.java index cb3cfae3..7819ccdb 100644 --- a/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/TransformerJarMojo.java +++ b/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/TransformerJarMojo.java @@ -34,7 +34,6 @@ import org.apache.maven.model.DependencyManagement; 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; @@ -49,6 +48,8 @@ import org.codehaus.plexus.util.StringUtils; import org.eclipse.transformer.maven.configuration.TransformerArtifact; +import javax.inject.Inject; + /** * Transforms a specified artifact into a new artifact. *

@@ -119,13 +120,13 @@ public class TransformerJarMojo extends AbstractTransformerMojo { @Parameter private TransformerArtifact artifact = new TransformerArtifact(); - @Component + @Inject private ArtifactResolver artifactResolver; - @Component + @Inject private MavenProjectHelper projectHelper; - @Component + @Inject private ArtifactHandlerManager artifactHandlerManager; @Override diff --git a/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/TransformerRunMojo.java b/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/TransformerRunMojo.java index 87db741d..c0f947af 100644 --- a/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/TransformerRunMojo.java +++ b/maven-plugins/transformer-maven-plugin/src/main/java/org/eclipse/transformer/maven/TransformerRunMojo.java @@ -24,7 +24,6 @@ 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; @@ -39,6 +38,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.inject.Inject; + /** * Transforms all the project's artifacts. *

@@ -89,7 +90,7 @@ public class TransformerRunMojo extends AbstractMojo { @Parameter(defaultValue = "${project.build.directory}", required = true) private File outputDirectory; - @Component + @Inject private MavenProjectHelper projectHelper; /** diff --git a/org.eclipse.transformer.parent/pom.xml b/org.eclipse.transformer.parent/pom.xml index c15e3487..6722944f 100644 --- a/org.eclipse.transformer.parent/pom.xml +++ b/org.eclipse.transformer.parent/pom.xml @@ -494,7 +494,7 @@ SPDX-License-Identifier: ${project.licenses[0].name} org.apache.maven.plugin-tools maven-plugin-annotations - 3.14.0 + 3.15.0 provided