Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>
<name>Spring Cloud Commons Docs</name>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Cloud Commons Parent</name>
<description>Spring Cloud Commons Parent</description>
<url>https://projects.spring.io/spring-cloud/</url>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<scm>
Expand Down
4 changes: 2 additions & 2 deletions spring-cloud-commons-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<artifactId>spring-cloud-dependencies-parent</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>spring-cloud-commons-dependencies</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>spring-cloud-commons-dependencies</name>
<description>Spring Cloud Commons Dependencies</description>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-commons</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,4 @@ SpringBootVersionVerifier springBootVersionVerifier(CompatibilityVerifierPropert
return new SpringBootVersionVerifier(properties.getCompatibleBootVersions());
}

@Bean
SleuthPresentVerifier sleuthPresentVerifier() {
return new SleuthPresentVerifier();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class CompatibilityVerifierProperties {
* the patch version if you don't want to specify a concrete value. Example:
* {@code 3.5.x}
*/
private List<String> compatibleBootVersions = List.of("4.0.x", "4.1.x");
private List<String> compatibleBootVersions = List.of("4.2.x");

public boolean isEnabled() {
return this.enabled;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.springframework.cloud.configuration;

import java.time.Duration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -25,7 +24,7 @@
import org.apache.commons.logging.LogFactory;

import org.springframework.boot.SpringBootVersion;
import org.springframework.boot.info.ProcessInfo;
import org.springframework.boot.system.ApplicationHome;
import org.springframework.util.StringUtils;

/**
Expand All @@ -35,7 +34,7 @@ class SpringBootVersionVerifier implements CompatibilityVerifier {

private static final Log log = LogFactory.getLog(SpringBootVersionVerifier.class);

final Map<String, CompatibilityPredicate> ACCEPTED_VERSIONS = new HashMap<>(Map.of("4.0", is4_0(), "4.1", is4_1()));
final Map<String, CompatibilityPredicate> ACCEPTED_VERSIONS = new HashMap<>(Map.of("4.2", is4_2()));

private final List<String> acceptedVersions;

Expand Down Expand Up @@ -68,39 +67,18 @@ String getVersionFromManifest() {
return SpringBootVersion.getVersion();
}

CompatibilityPredicate is4_0() {
CompatibilityPredicate is4_2() {
return new CompatibilityPredicate() {

@Override
public String toString() {
return "Predicate for Boot 4.0";
return "Predicate for Boot 4.2";
}

@Override
public boolean isCompatible() {
try {
Class.forName("org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty");
return true;
}
catch (ClassNotFoundException e) {
return false;
}
}
};
}

CompatibilityPredicate is4_1() {
return new CompatibilityPredicate() {

@Override
public String toString() {
return "Predicate for Boot 4.1";
}

@Override
public boolean isCompatible() {
try {
ProcessInfo.class.getMethod("getUptime", Duration.class);
ApplicationHome.class.getMethod("getSourcePath");
return true;
}
catch (NoSuchMethodException e) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,8 @@ String getVersionFromManifest() {

@Test
public void should_match_against_current_manifest() {
try {
verifyCurrentVersionFromManifest("4.0");
verifyCurrentVersionFromManifest("4.0.x");
}
catch (AssertionError e) {
if (e.getMessage() != null && e.getMessage().contains("4.1.")) {
// we're likely running a boot 4.1 compatibility test, try 4.1
verifyCurrentVersionFromManifest("4.1");
verifyCurrentVersionFromManifest("4.1.x");
}
else {
throw e;
}
}
verifyCurrentVersionFromManifest("4.2");
verifyCurrentVersionFromManifest("4.2.x");
}

private void verifyCurrentVersionFromManifest(String version) {
Expand All @@ -205,15 +193,15 @@ private void verifyCurrentVersionFromManifest(String version) {

@Test
public void should_match_against_current_predicate() {
List<String> acceptedVersions = Collections.singletonList("4.0");
List<String> acceptedVersions = Collections.singletonList("4.2");
SpringBootVersionVerifier versionVerifier = new SpringBootVersionVerifier(acceptedVersions) {
@Override
String getVersionFromManifest() {
return "";
}
};
versionVerifier.ACCEPTED_VERSIONS.clear();
versionVerifier.ACCEPTED_VERSIONS.put("4.0", versionVerifier.is4_0());
versionVerifier.ACCEPTED_VERSIONS.put("4.2", versionVerifier.is4_2());

VerificationResult verificationResult = versionVerifier.verify();

Expand All @@ -223,15 +211,15 @@ String getVersionFromManifest() {

@Test
public void should_match_against_current_predicate_with_version_ending_with_x() {
List<String> acceptedVersions = Collections.singletonList("4.0.x");
List<String> acceptedVersions = Collections.singletonList("4.2.x");
SpringBootVersionVerifier versionVerifier = new SpringBootVersionVerifier(acceptedVersions) {
@Override
String getVersionFromManifest() {
return "";
}
};
versionVerifier.ACCEPTED_VERSIONS.clear();
versionVerifier.ACCEPTED_VERSIONS.put("4.0", versionVerifier.is4_0());
versionVerifier.ACCEPTED_VERSIONS.put("4.2", versionVerifier.is4_2());

VerificationResult verificationResult = versionVerifier.verify();

Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-context-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-context-integration-tests</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-context-webflux-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-context-webflux-integration-tests</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-context/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-context</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-loadbalancer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-loadbalancer</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-starter-bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-starter-loadbalancer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
</parent>
<artifactId>spring-cloud-starter</artifactId>
<name>spring-cloud-starter</name>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-test-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
<version>5.0.3-SNAPSHOT</version>
<version>5.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-test-support</artifactId>
Expand Down