diff --git a/eventuate-cdc-common-e2e-tests/build.gradle b/eventuate-cdc-common-e2e-tests/build.gradle index d000fb9b..f25f7580 100644 --- a/eventuate-cdc-common-e2e-tests/build.gradle +++ b/eventuate-cdc-common-e2e-tests/build.gradle @@ -6,7 +6,7 @@ dependencies { api "io.eventuate.common:eventuate-common-spring-jdbc:$eventuateCommonVersion" api "junit:junit:4.11" api "io.eventuate.util:eventuate-util-test:$eventuateUtilVersion" - api "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + api "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-cdc-data-producer-wrappers/build.gradle b/eventuate-cdc-data-producer-wrappers/build.gradle index f22898fc..b95dfcfe 100644 --- a/eventuate-cdc-data-producer-wrappers/build.gradle +++ b/eventuate-cdc-data-producer-wrappers/build.gradle @@ -12,7 +12,7 @@ dependencies { testImplementation project(":eventuate-local-java-cdc-connector-test-util") testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-cdc-service/build.gradle b/eventuate-cdc-service/build.gradle index 724329f8..58b937be 100644 --- a/eventuate-cdc-service/build.gradle +++ b/eventuate-cdc-service/build.gradle @@ -4,15 +4,15 @@ buildscript { mavenCentral() } dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion") + classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootPluginVersion") } } apply plugin: 'org.springframework.boot' dependencies { - implementation "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion" - implementation "org.springframework.boot:spring-boot-starter-web:$springBootVersion" + implementation "org.springframework.boot:spring-boot-starter-actuator" + implementation "org.springframework.boot:spring-boot-starter-web" implementation project(":eventuate-cdc-connector-autoconfigure") implementation 'io.micrometer:micrometer-registry-jmx:0.12.0.RELEASE' diff --git a/eventuate-local-java-cdc-connector-common/build.gradle b/eventuate-local-java-cdc-connector-common/build.gradle index 630dcde7..1455e111 100644 --- a/eventuate-local-java-cdc-connector-common/build.gradle +++ b/eventuate-local-java-cdc-connector-common/build.gradle @@ -3,11 +3,11 @@ apply plugin: 'java-library' dependencies { api project (":eventuate-cdc-data-producer-wrappers") - api "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion" - api "org.springframework.boot:spring-boot-starter:$springBootVersion" + api "org.springframework.boot:spring-boot-starter-actuator" + api "org.springframework.boot:spring-boot-starter" api 'org.apache.curator:curator-recipes:2.11.0' api "io.dropwizard.metrics:metrics-core:$dropwizardMetricsVersion" - api "org.springframework.boot:spring-boot-starter-jdbc:$springBootVersion" + api "org.springframework.boot:spring-boot-starter-jdbc" api 'io.micrometer:micrometer-core:1.1.1' api 'io.micrometer:micrometer-registry-jmx:1.1.1' api 'io.micrometer:micrometer-registry-prometheus:1.1.1' @@ -25,7 +25,7 @@ dependencies { api 'com.microsoft.sqlserver:mssql-jdbc:7.2.1.jre8' api 'org.apache.kafka:kafka-clients:2.3.0' testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" testImplementation "io.eventuate.util:eventuate-util-test:$eventuateUtilVersion" } diff --git a/eventuate-local-java-cdc-connector-db-log-test-common/build.gradle b/eventuate-local-java-cdc-connector-db-log-test-common/build.gradle index 0ecb4d10..e994e71c 100644 --- a/eventuate-local-java-cdc-connector-db-log-test-common/build.gradle +++ b/eventuate-local-java-cdc-connector-db-log-test-common/build.gradle @@ -6,7 +6,7 @@ dependencies { api "io.eventuate.messaging.kafka:eventuate-messaging-kafka-spring-common:$eventuateMessagingKafkaVersion" testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-local-java-cdc-connector-e2e-tests/build.gradle b/eventuate-local-java-cdc-connector-e2e-tests/build.gradle index 23c2bafa..18cc94c6 100644 --- a/eventuate-local-java-cdc-connector-e2e-tests/build.gradle +++ b/eventuate-local-java-cdc-connector-e2e-tests/build.gradle @@ -9,7 +9,7 @@ dependencies { testImplementation "io.eventuate.common:eventuate-common-spring-jdbc:$eventuateCommonVersion" testImplementation "io.eventuate.common:eventuate-common-spring-id:$eventuateCommonVersion" testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-local-java-cdc-connector-mysql-binlog/build.gradle b/eventuate-local-java-cdc-connector-mysql-binlog/build.gradle index 357825e5..221b9e65 100644 --- a/eventuate-local-java-cdc-connector-mysql-binlog/build.gradle +++ b/eventuate-local-java-cdc-connector-mysql-binlog/build.gradle @@ -11,7 +11,7 @@ dependencies { testImplementation project(":eventuate-local-java-cdc-connector-db-log-test-common") testImplementation "io.eventuate.util:eventuate-util-test:$eventuateUtilVersion" testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-local-java-cdc-connector-polling/build.gradle b/eventuate-local-java-cdc-connector-polling/build.gradle index 3921d649..b31d5d0a 100644 --- a/eventuate-local-java-cdc-connector-polling/build.gradle +++ b/eventuate-local-java-cdc-connector-polling/build.gradle @@ -10,7 +10,7 @@ dependencies { testImplementation project(":eventuate-local-java-cdc-connector-test-util") testImplementation "io.eventuate.util:eventuate-util-test:$eventuateUtilVersion" testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-local-java-cdc-connector-postgres-wal/build.gradle b/eventuate-local-java-cdc-connector-postgres-wal/build.gradle index 67eef974..f9a1200c 100644 --- a/eventuate-local-java-cdc-connector-postgres-wal/build.gradle +++ b/eventuate-local-java-cdc-connector-postgres-wal/build.gradle @@ -13,7 +13,7 @@ dependencies { testImplementation project(":eventuate-local-java-cdc-connector-db-log-test-common") testImplementation "io.eventuate.util:eventuate-util-test:$eventuateUtilVersion" testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-local-java-cdc-connector-unified/build.gradle b/eventuate-local-java-cdc-connector-unified/build.gradle index 6b143759..7303b406 100644 --- a/eventuate-local-java-cdc-connector-unified/build.gradle +++ b/eventuate-local-java-cdc-connector-unified/build.gradle @@ -11,7 +11,7 @@ dependencies { testImplementation "junit:junit:4.11" testImplementation "com.h2database:h2:1.4.199" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-local-java-jdbc/build.gradle b/eventuate-local-java-jdbc/build.gradle index 574504ff..25029d3f 100644 --- a/eventuate-local-java-jdbc/build.gradle +++ b/eventuate-local-java-jdbc/build.gradle @@ -1,14 +1,14 @@ apply plugin: 'java-library' dependencies { - api "org.springframework.boot:spring-boot-starter:$springBootVersion" - api "org.springframework.boot:spring-boot-starter-jdbc:$springBootVersion" + api "org.springframework.boot:spring-boot-starter" + api "org.springframework.boot:spring-boot-starter-jdbc" api 'mysql:mysql-connector-java:8.0.21' api ('org.postgresql:postgresql:42.1.4') { exclude group: "org.slf4j", module: "slf4j-simple" } api group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '7.2.1.jre8' - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } diff --git a/eventuate-local-java-migration/build.gradle b/eventuate-local-java-migration/build.gradle index 008ce3df..c40e5485 100644 --- a/eventuate-local-java-migration/build.gradle +++ b/eventuate-local-java-migration/build.gradle @@ -16,7 +16,7 @@ dependencies { testImplementation "io.eventuate.messaging.kafka:eventuate-messaging-kafka-spring-common:$eventuateMessagingKafkaVersion" testImplementation "io.eventuate.util:eventuate-util-test:$eventuateUtilVersion" testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-local-java-test-util/build.gradle b/eventuate-local-java-test-util/build.gradle index 327f4e99..21c5d67c 100644 --- a/eventuate-local-java-test-util/build.gradle +++ b/eventuate-local-java-test-util/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'java-library' dependencies { - api "org.springframework.boot:spring-boot-starter:$springBootVersion" - api "org.springframework.boot:spring-boot-starter-test:$springBootVersion" - api "org.springframework.boot:spring-boot-starter-jdbc:$springBootVersion" + api "org.springframework.boot:spring-boot-starter" + api "org.springframework.boot:spring-boot-starter-test" + api "org.springframework.boot:spring-boot-starter-jdbc" } diff --git a/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPollingProfilesResolver.java b/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPollingProfilesResolver.java index ca088568..766f72c2 100644 --- a/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPollingProfilesResolver.java +++ b/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPollingProfilesResolver.java @@ -1,14 +1,8 @@ package io.eventuate.local.testutil; -import java.util.Set; - public class DefaultAndPollingProfilesResolver extends DefaultProfilesResolver { - @Override - public String[] resolve(Class testClass) { - Set activeProfiles = getDefaultProfiles(); - - activeProfiles.add("EventuatePolling"); - return convertProfilesToArray(activeProfiles); + public DefaultAndPollingProfilesResolver() { + super("EventuatePolling"); } } diff --git a/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPostgresProfilesResolver.java b/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPostgresProfilesResolver.java index 5bbe578d..51b075b0 100644 --- a/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPostgresProfilesResolver.java +++ b/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPostgresProfilesResolver.java @@ -1,14 +1,7 @@ package io.eventuate.local.testutil; -import java.util.Set; - public class DefaultAndPostgresProfilesResolver extends DefaultProfilesResolver { - @Override - public String[] resolve(Class testClass) { - Set activeProfiles = getDefaultProfiles(); - - activeProfiles.add("postgres"); - - return convertProfilesToArray(activeProfiles); + public DefaultAndPostgresProfilesResolver() { + super("postgres"); } } diff --git a/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPostgresWalProfilesResolver.java b/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPostgresWalProfilesResolver.java index 29d0300e..d82c9eb2 100644 --- a/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPostgresWalProfilesResolver.java +++ b/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultAndPostgresWalProfilesResolver.java @@ -1,15 +1,7 @@ package io.eventuate.local.testutil; -import java.util.Set; - public class DefaultAndPostgresWalProfilesResolver extends DefaultProfilesResolver { - @Override - public String[] resolve(Class testClass) { - Set activeProfiles = getDefaultProfiles(); - - activeProfiles.add("PostgresWal"); - activeProfiles.add("postgres"); - - return convertProfilesToArray(activeProfiles); + public DefaultAndPostgresWalProfilesResolver() { + super("PostgresWal", "postgres"); } } diff --git a/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultProfilesResolver.java b/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultProfilesResolver.java index 48dfd0b2..9da8548b 100644 --- a/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultProfilesResolver.java +++ b/eventuate-local-java-test-util/src/main/java/io/eventuate/local/testutil/DefaultProfilesResolver.java @@ -2,18 +2,24 @@ import org.springframework.test.context.ActiveProfilesResolver; -import java.util.Arrays; import java.util.HashSet; +import java.util.List; import java.util.Set; +import static java.util.Arrays.asList; + public class DefaultProfilesResolver implements ActiveProfilesResolver { + private List additionalProfiles; + + public DefaultProfilesResolver(String... additionalProfiles) { + this.additionalProfiles = asList(additionalProfiles); + } + @Override public String[] resolve(Class testClass) { - Set activeProfiles = getDefaultProfiles(); - activeProfiles.add("postgres"); - activeProfiles.add("PostgresWal"); + activeProfiles.addAll(this.additionalProfiles); return convertProfilesToArray(activeProfiles); } @@ -23,7 +29,7 @@ protected Set getDefaultProfiles() { if (springProfilesActive == null) return new HashSet<>(); - return new HashSet<>(Arrays.asList(springProfilesActive.split(","))); + return new HashSet<>(asList(springProfilesActive.split(","))); } protected String[] convertProfilesToArray(Set profiles) { diff --git a/eventuate-tram-cdc-connector-activemq-e2e-tests/build.gradle b/eventuate-tram-cdc-connector-activemq-e2e-tests/build.gradle index 511fa7b6..a2636b5f 100644 --- a/eventuate-tram-cdc-connector-activemq-e2e-tests/build.gradle +++ b/eventuate-tram-cdc-connector-activemq-e2e-tests/build.gradle @@ -7,7 +7,7 @@ dependencies { testImplementation "io.eventuate.messaging.activemq:eventuate-messaging-activemq-spring-consumer:$eventuateMessagingActiveMQVersion" testImplementation "io.eventuate.util:eventuate-util-test:$eventuateUtilVersion" testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-tram-cdc-connector-kafka-e2e-tests/build.gradle b/eventuate-tram-cdc-connector-kafka-e2e-tests/build.gradle index 9a5d5a96..f64032b4 100644 --- a/eventuate-tram-cdc-connector-kafka-e2e-tests/build.gradle +++ b/eventuate-tram-cdc-connector-kafka-e2e-tests/build.gradle @@ -7,7 +7,7 @@ dependencies { testImplementation "io.eventuate.messaging.kafka:eventuate-messaging-kafka-spring-consumer:$eventuateMessagingKafkaVersion" testImplementation "io.eventuate.util:eventuate-util-test:$eventuateUtilVersion" testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-tram-cdc-connector-rabbitmq-e2e-tests/build.gradle b/eventuate-tram-cdc-connector-rabbitmq-e2e-tests/build.gradle index e3398c7b..a80942c2 100644 --- a/eventuate-tram-cdc-connector-rabbitmq-e2e-tests/build.gradle +++ b/eventuate-tram-cdc-connector-rabbitmq-e2e-tests/build.gradle @@ -7,7 +7,7 @@ dependencies { testImplementation "io.eventuate.messaging.rabbitmq:eventuate-messaging-rabbitmq-spring-consumer:$eventuateMessagingRabbitMQVersion" testImplementation "io.eventuate.util:eventuate-util-test:$eventuateUtilVersion" testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-tram-cdc-connector-redis-e2e-tests/build.gradle b/eventuate-tram-cdc-connector-redis-e2e-tests/build.gradle index 159a44b3..1a5c840b 100644 --- a/eventuate-tram-cdc-connector-redis-e2e-tests/build.gradle +++ b/eventuate-tram-cdc-connector-redis-e2e-tests/build.gradle @@ -8,7 +8,7 @@ dependencies { testImplementation "io.eventuate.messaging.redis:eventuate-messaging-redis-spring-common:$eventuateMessagingRedisVersion" testImplementation "io.eventuate.util:eventuate-util-test:$eventuateUtilVersion" testImplementation "junit:junit:4.11" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" } test { diff --git a/eventuate-tram-cdc-connector/build.gradle b/eventuate-tram-cdc-connector/build.gradle index 927a3539..4acf0601 100644 --- a/eventuate-tram-cdc-connector/build.gradle +++ b/eventuate-tram-cdc-connector/build.gradle @@ -8,7 +8,7 @@ dependencies { api "io.eventuate.messaging.kafka:eventuate-messaging-kafka-spring-common:$eventuateMessagingKafkaVersion" api project(":eventuate-local-java-cdc-connector-unified:") - api "org.springframework.boot:spring-boot-starter-web:$springBootVersion" + api "org.springframework.boot:spring-boot-starter-web" - testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion" + testImplementation "org.springframework.boot:spring-boot-starter-test" }