You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2024/12/20 10:28:56 UTC
(maven-surefire) 01/02: Switxh from PLexus Annotations to javax.inject
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch guice
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
commit 0df688db8d7885e1d0198e4c14ff32e9912421a4
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Tue Dec 3 17:25:42 2024 -0500
Switxh from PLexus Annotations to javax.inject
---
.../java/org/apache/maven/plugin/failsafe/VerifyMojo.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java
index cef6391ec..160975098 100644
--- a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java
+++ b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java
@@ -29,7 +29,6 @@ import org.apache.maven.plugin.failsafe.util.FailsafeSummaryXmlUtils;
import org.apache.maven.plugin.surefire.SurefireHelper;
import org.apache.maven.plugin.surefire.SurefireReportParameters;
import org.apache.maven.plugin.surefire.log.PluginConsoleLogger;
-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;
@@ -38,6 +37,8 @@ import org.apache.maven.surefire.api.suite.RunResult;
import org.apache.maven.surefire.booter.SurefireBooterForkException;
import org.codehaus.plexus.logging.Logger;
+import javax.inject.Inject;
+
import static org.apache.maven.plugin.surefire.SurefireHelper.reportExecution;
import static org.apache.maven.surefire.api.suite.RunResult.noTestsRun;
import static org.apache.maven.surefire.shared.utils.StringUtils.capitalizeFirstLetter;
@@ -160,13 +161,17 @@ public class VerifyMojo extends AbstractMojo implements SurefireReportParameters
@Parameter(defaultValue = "${session}", readonly = true)
private MavenSession session;
- @Component
- private Logger logger;
+ private final Logger logger;
private Collection<CommandLineOption> cli;
private volatile PluginConsoleLogger consoleLogger;
+ @Inject
+ public VerifyMojo(Logger logger) {
+ this.logger = logger;
+ }
+
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
cli = commandLineOptions();