Skip to content

Commit f4138be

Browse files
GH-155: Migrate to AWS SDK v2
Fixes spring-projects/spring-integration-aws#155 * Upgrade to the latest deps including Gradle * Remove XML configuration support * Make use of SC-AWS 3.0 SQS and SNS support in respective channel adapters
1 parent d8cf6ff commit f4138be

File tree

89 files changed

+2489
-5676
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2489
-5676
lines changed

build.gradle

+25-50
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ repositories {
3232
ext {
3333
assertjVersion = '3.23.1'
3434
awaitilityVersion = '4.2.0'
35+
awsSdkVersion = '2.20.22'
3536
jacksonVersion = '2.14.1'
3637
junitVersion = '5.9.1'
3738
servletApiVersion = '6.0.0'
3839
log4jVersion = '2.19.0'
39-
springCloudAwsVersion = '2.4.2'
40-
springIntegrationVersion = '6.0.3'
41-
kinesisClientVersion = '1.14.9'
40+
springCloudAwsVersion = '3.0.0-RC1'
41+
springIntegrationVersion = '6.1.0-SNAPSHOT'
42+
kinesisClientVersion = '2.4.5'
4243
kinesisProducerVersion = '0.14.13'
4344
testcontainersVersion = '1.17.6'
4445

@@ -51,7 +52,7 @@ ext {
5152
linkScmConnection = 'https://github.com/spring-projects/spring-integration-aws.git'
5253
linkScmDevConnection = '[email protected]:spring-projects/spring-integration-aws.git'
5354

54-
modifiedFiles = files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') }
55+
modifiedFiles = files(grgit.status().unstaged.modified).filter { f -> f.name.endsWith('.java') }
5556
}
5657

5758
ext.javadocLinks = [
@@ -88,6 +89,7 @@ dependencyManagement {
8889
}
8990
imports {
9091
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:$springCloudAwsVersion"
92+
mavenBom "software.amazon.awssdk:bom:$awsSdkVersion"
9193
mavenBom "org.springframework.integration:spring-integration-bom:$springIntegrationVersion"
9294
mavenBom "com.fasterxml.jackson:jackson-bom:$jacksonVersion"
9395
mavenBom "org.junit:junit-bom:$junitVersion"
@@ -97,38 +99,41 @@ dependencyManagement {
9799
}
98100

99101
jacoco {
100-
toolVersion = '0.8.7'
102+
toolVersion = '0.8.8'
101103
}
102104

103105
checkstyle {
104106
configDirectory.set(rootProject.file('src/checkstyle'))
105-
toolVersion = '10.7.0'
107+
toolVersion = '10.8.0'
106108
}
107109

108110
dependencies {
109111
api 'org.springframework.integration:spring-integration-core'
110112
api 'io.awspring.cloud:spring-cloud-aws-core'
111113
api 'com.fasterxml.jackson.core:jackson-databind'
112114

113-
optionalApi 'io.awspring.cloud:spring-cloud-aws-messaging'
115+
optionalApi 'io.awspring.cloud:spring-cloud-aws-sns'
116+
optionalApi 'io.awspring.cloud:spring-cloud-aws-sqs'
117+
optionalApi 'io.awspring.cloud:spring-cloud-aws-s3'
114118
optionalApi 'org.springframework.integration:spring-integration-file'
115119
optionalApi 'org.springframework.integration:spring-integration-http'
116120

117-
optionalApi "com.amazonaws:amazon-kinesis-client:$kinesisClientVersion"
121+
optionalApi "software.amazon.kinesis:amazon-kinesis-client:$kinesisClientVersion"
118122
optionalApi "com.amazonaws:amazon-kinesis-producer:$kinesisProducerVersion"
119123

120-
optionalApi 'com.amazonaws:aws-java-sdk-kinesis'
121-
optionalApi 'com.amazonaws:aws-java-sdk-dynamodb'
124+
optionalApi 'software.amazon.awssdk:kinesis'
125+
optionalApi 'software.amazon.awssdk:dynamodb'
126+
optionalApi 'software.amazon.awssdk:s3-transfer-manager'
122127

123128
optionalApi "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
124129

125-
testImplementation ('org.springframework.integration:spring-integration-test') {
130+
testImplementation('org.springframework.integration:spring-integration-test') {
126131
exclude group: 'junit'
127132
}
128133

129134
testImplementation "org.assertj:assertj-core:$assertjVersion"
130135

131-
testImplementation ("org.awaitility:awaitility:$awaitilityVersion") {
136+
testImplementation("org.awaitility:awaitility:$awaitilityVersion") {
132137
exclude group: 'org.hamcrest'
133138
}
134139
testImplementation 'org.junit.jupiter:junit-jupiter-api'
@@ -177,16 +182,16 @@ test {
177182
jacoco {
178183
destinationFile = file("$buildDir/jacoco.exec")
179184
}
180-
useJUnitPlatform()
181-
// suppress all console output during testing unless running `gradle -i`
182-
logging.captureStandardOutput(LogLevel.INFO)
185+
useJUnitPlatform()
186+
// suppress all console output during testing unless running `gradle -i`
187+
logging.captureStandardOutput(LogLevel.INFO)
183188
}
184189

185190
jacocoTestReport {
186191
reports {
187-
xml.enabled false
188-
csv.enabled false
189-
html.destination file("$buildDir/reports/jacoco/html")
192+
csv.required = false
193+
html.required = false
194+
xml.outputLocation = file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
190195
}
191196
}
192197

@@ -237,32 +242,6 @@ sonarqube {
237242
}
238243
}
239244

240-
task schemaZip(type: Zip) {
241-
group = 'Distribution'
242-
archiveClassifier = 'schema'
243-
description = "Builds -${archiveClassifier} archive containing all " +
244-
"XSDs for deployment at static.springframework.org/schema."
245-
246-
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
247-
248-
Properties schemas = new Properties();
249-
def shortName = idPrefix.replaceFirst("${idPrefix}-", '')
250-
251-
project.sourceSets.main.resources.find {
252-
it.path.endsWith("META-INF${File.separator}spring.schemas")
253-
}?.withInputStream { schemas.load(it) }
254-
255-
for (def key : schemas.keySet()) {
256-
File xsdFile = project.sourceSets.main.resources.find {
257-
it.path.replaceAll('\\\\', '/').endsWith(schemas.get(key))
258-
}
259-
assert xsdFile != null
260-
into("integration/${shortName}") {
261-
from xsdFile.path
262-
}
263-
}
264-
}
265-
266245
task docsZip(type: Zip) {
267246
group = 'Distribution'
268247
archiveClassifier = 'docs'
@@ -278,7 +257,7 @@ task docsZip(type: Zip) {
278257
}
279258
}
280259

281-
task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
260+
task distZip(type: Zip, dependsOn: docsZip) {
282261
group = 'Distribution'
283262
archiveClassifier = 'dist'
284263
description = "Builds -${archiveClassifier} archive, containing all jars and docs, " +
@@ -297,10 +276,6 @@ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
297276
into "${baseDir}"
298277
}
299278

300-
from(zipTree(schemaZip.archiveFile)) {
301-
into "${baseDir}/schema"
302-
}
303-
304279
into("${baseDir}/libs") {
305280
from project.jar
306281
from project.sourcesJar
@@ -310,7 +285,7 @@ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
310285

311286
task dist(dependsOn: assemble) {
312287
group = 'Distribution'
313-
description = 'Builds -dist, -docs and -schema distribution archives.'
288+
description = 'Builds -dist and -docs distribution archives.'
314289
}
315290

316291
apply from: "${rootProject.projectDir}/publish-maven.gradle"

gradle/wrapper/gradle-wrapper.jar

34 Bytes
Binary file not shown.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
45
networkTimeout=10000
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists
7-
distributionSha256Sum=7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b

gradlew

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146146
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
147+
# shellcheck disable=SC3045
148148
MAX_FD=$( ulimit -H -n ) ||
149149
warn "Could not query maximum file descriptor limit"
150150
esac
151151
case $MAX_FD in #(
152152
'' | soft) :;; #(
153153
*)
154154
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
155+
# shellcheck disable=SC3045
156156
ulimit -n "$MAX_FD" ||
157157
warn "Could not set maximum file descriptor limit to $MAX_FD"
158158
esac

publish-maven.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ publishing {
66
suppressAllPomMetadataWarnings()
77
from components.java
88
artifact docsZip
9-
artifact schemaZip
109
artifact distZip
1110
pom {
1211
afterEvaluate {
@@ -34,7 +33,7 @@ publishing {
3433
developer {
3534
id = 'artembilan'
3635
name = 'Artem Bilan'
37-
email = 'abilan@pivotal.io'
36+
email = 'abilan@vmware.com'
3837
roles = ['project lead']
3938
}
4039
}

src/main/java/org/springframework/integration/aws/config/xml/AwsNamespaceHandler.java

-42
This file was deleted.

src/main/java/org/springframework/integration/aws/config/xml/AwsParserUtils.java

-72
This file was deleted.

src/main/java/org/springframework/integration/aws/config/xml/S3InboundChannelAdapterParser.java

-61
This file was deleted.

0 commit comments

Comments
 (0)