Remove unused dependency injection
This commit is contained in:
@@ -189,6 +189,42 @@
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>
|
||||
org.apache.maven.plugins
|
||||
</groupId>
|
||||
<artifactId>
|
||||
maven-plugin-plugin
|
||||
</artifactId>
|
||||
<versionRange>
|
||||
[3.5,)
|
||||
</versionRange>
|
||||
<goals>
|
||||
<goal>descriptor</goal>
|
||||
<goal>helpmojo</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore></ignore>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<reporting>
|
||||
|
||||
@@ -20,8 +20,6 @@ import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.maven.execution.MavenSession;
|
||||
import org.apache.maven.model.Dependency;
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
@@ -34,7 +32,6 @@ import org.apache.maven.project.MavenProject;
|
||||
import org.apache.maven.shared.filtering.MavenResourcesFiltering;
|
||||
import org.eclipse.aether.RepositorySystemSession;
|
||||
|
||||
import org.springframework.cloud.contract.maven.verifier.stubrunner.AetherStubDownloaderFactory;
|
||||
import org.springframework.cloud.contract.stubrunner.spring.StubRunnerProperties;
|
||||
import org.springframework.cloud.contract.verifier.config.ContractVerifierConfigProperties;
|
||||
import org.springframework.cloud.contract.verifier.converter.RecursiveFilesConverter;
|
||||
@@ -57,8 +54,6 @@ public class ConvertMojo extends AbstractMojo {
|
||||
static final String CONTRACTS_PATH = "/contracts";
|
||||
static final String ORIGINAL_PATH = "/original";
|
||||
|
||||
private final AetherStubDownloaderFactory aetherStubDownloaderFactory;
|
||||
|
||||
@Parameter(defaultValue = "${repositorySystemSession}", readonly = true)
|
||||
private RepositorySystemSession repoSession;
|
||||
|
||||
@@ -186,11 +181,7 @@ public class ConvertMojo extends AbstractMojo {
|
||||
@Component(role = MavenResourcesFiltering.class, hint = "default")
|
||||
private MavenResourcesFiltering mavenResourcesFiltering;
|
||||
|
||||
@Inject
|
||||
public ConvertMojo(AetherStubDownloaderFactory aetherStubDownloaderFactory) {
|
||||
this.aetherStubDownloaderFactory = aetherStubDownloaderFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() throws MojoExecutionException {
|
||||
if (this.skip) {
|
||||
getLog().info(String.format(
|
||||
|
||||
@@ -21,8 +21,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.apache.maven.model.Dependency;
|
||||
import org.apache.maven.model.Resource;
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
@@ -35,7 +33,6 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.eclipse.aether.RepositorySystemSession;
|
||||
|
||||
import org.springframework.cloud.contract.maven.verifier.stubrunner.AetherStubDownloaderFactory;
|
||||
import org.springframework.cloud.contract.spec.ContractVerifierException;
|
||||
import org.springframework.cloud.contract.stubrunner.spring.StubRunnerProperties;
|
||||
import org.springframework.cloud.contract.verifier.TestGenerator;
|
||||
@@ -53,8 +50,6 @@ import org.springframework.cloud.contract.verifier.config.TestMode;
|
||||
requiresDependencyResolution = ResolutionScope.TEST)
|
||||
public class GenerateTestsMojo extends AbstractMojo {
|
||||
|
||||
private final AetherStubDownloaderFactory aetherStubDownloaderFactory;
|
||||
|
||||
@Parameter(defaultValue = "${repositorySystemSession}", readonly = true)
|
||||
private RepositorySystemSession repoSession;
|
||||
|
||||
@@ -234,11 +229,7 @@ public class GenerateTestsMojo extends AbstractMojo {
|
||||
@Parameter(property = "contractsProperties")
|
||||
private Map<String, String> contractsProperties = new HashMap<>();
|
||||
|
||||
@Inject
|
||||
public GenerateTestsMojo(AetherStubDownloaderFactory aetherStubDownloaderFactory) {
|
||||
this.aetherStubDownloaderFactory = aetherStubDownloaderFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() throws MojoExecutionException, MojoFailureException {
|
||||
if (this.skip || this.mavenTestSkip || this.skipTests) {
|
||||
if (this.skip) {
|
||||
|
||||
@@ -37,7 +37,6 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
@SuppressWarnings("FieldCanBeLocal")
|
||||
@Mojo(name = "pushStubsToScm")
|
||||
public class PushStubsToScmMojo extends AbstractMojo {
|
||||
|
||||
@@ -105,6 +104,7 @@ public class PushStubsToScmMojo extends AbstractMojo {
|
||||
@Parameter(property = "contractsProperties")
|
||||
private Map<String, String> contractsProperties = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
if (this.skip || this.taskSkip) {
|
||||
getLog().info(
|
||||
|
||||
@@ -44,7 +44,6 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @author Mariusz Smykula
|
||||
*/
|
||||
@SuppressWarnings("FieldCanBeLocal")
|
||||
@Mojo(name = "run", requiresProject = false,
|
||||
requiresDependencyResolution = ResolutionScope.RUNTIME)
|
||||
public class RunMojo extends AbstractMojo {
|
||||
@@ -124,6 +123,7 @@ public class RunMojo extends AbstractMojo {
|
||||
this.remoteStubRunner = remoteStubRunner;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() throws MojoExecutionException, MojoFailureException {
|
||||
if (this.skip || this.skipTestOnly) {
|
||||
getLog().info(
|
||||
|
||||
Reference in New Issue
Block a user