Downgraded maven resolver to 1.4 to align with Maven 3.6
This commit is contained in:
4
pom.xml
4
pom.xml
@@ -55,9 +55,9 @@
|
||||
<!-- We need to have compatibility with Gradle -->
|
||||
<groovy.version>2.5.12</groovy.version>
|
||||
<!-- We need to have compatibility with Boot -->
|
||||
<maven.version>3.6.0</maven.version>
|
||||
<maven.version>3.6.3</maven.version>
|
||||
<!-- Resolver has to be aligned with Maven (e.g resolver 1.4 and Maven 3.6 or resolver 1.3 and Maven 3.5) -->
|
||||
<maven.resolver.version>1.6.1</maven.resolver.version>
|
||||
<maven.resolver.version>1.4.1</maven.resolver.version>
|
||||
<xpath2.processor.version>2.1.100</xpath2.processor.version>
|
||||
<xerces.version>2.12.0</xerces.version>
|
||||
<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.springframework.cloud.contract.stubrunner;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import org.sonatype.plexus.components.cipher.DefaultPlexusCipher;
|
||||
import org.sonatype.plexus.components.cipher.PlexusCipherException;
|
||||
@@ -58,21 +57,7 @@ public class MavenSettings {
|
||||
}
|
||||
|
||||
public SettingsDecrypter createSettingsDecrypter() {
|
||||
SettingsDecrypter settingsDecrypter = new DefaultSettingsDecrypter();
|
||||
setField(DefaultSettingsDecrypter.class, "securityDispatcher", settingsDecrypter,
|
||||
new MavenSettings.SpringCloudContractSecDispatcher());
|
||||
return settingsDecrypter;
|
||||
}
|
||||
|
||||
private void setField(Class<?> sourceClass, String fieldName, Object target, Object value) {
|
||||
try {
|
||||
Field field = sourceClass.getDeclaredField(fieldName);
|
||||
field.setAccessible(true);
|
||||
field.set(target, value);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new IllegalStateException("Failed to set field '" + fieldName + "' on '" + target + "'", ex);
|
||||
}
|
||||
return new DefaultSettingsDecrypter(new SpringCloudContractSecDispatcher());
|
||||
}
|
||||
|
||||
private class SpringCloudContractSecDispatcher extends DefaultSecDispatcher {
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-contract-verifier</artifactId>
|
||||
@@ -40,6 +41,8 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- We're building the project via Gradle and if we don't put in a fake source directory then Maven will try to actually compile the Gradle code -->
|
||||
<sourceDirectory>src/main/fake</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
||||
Reference in New Issue
Block a user