Skip to content

Commit

Permalink
GH-155: Migrate to AWS SDK v2
Browse files Browse the repository at this point in the history
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
  • Loading branch information
guygriffin1989106 committed Mar 14, 2023
1 parent d8cf6ff commit f4138be
Show file tree
Hide file tree
Showing 89 changed files with 2,489 additions and 5,676 deletions.
75 changes: 25 additions & 50 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ repositories {
ext {
assertjVersion = '3.23.1'
awaitilityVersion = '4.2.0'
awsSdkVersion = '2.20.22'
jacksonVersion = '2.14.1'
junitVersion = '5.9.1'
servletApiVersion = '6.0.0'
log4jVersion = '2.19.0'
springCloudAwsVersion = '2.4.2'
springIntegrationVersion = '6.0.3'
kinesisClientVersion = '1.14.9'
springCloudAwsVersion = '3.0.0-RC1'
springIntegrationVersion = '6.1.0-SNAPSHOT'
kinesisClientVersion = '2.4.5'
kinesisProducerVersion = '0.14.13'
testcontainersVersion = '1.17.6'

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

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

ext.javadocLinks = [
Expand Down Expand Up @@ -88,6 +89,7 @@ dependencyManagement {
}
imports {
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:$springCloudAwsVersion"
mavenBom "software.amazon.awssdk:bom:$awsSdkVersion"
mavenBom "org.springframework.integration:spring-integration-bom:$springIntegrationVersion"
mavenBom "com.fasterxml.jackson:jackson-bom:$jacksonVersion"
mavenBom "org.junit:junit-bom:$junitVersion"
Expand All @@ -97,38 +99,41 @@ dependencyManagement {
}

jacoco {
toolVersion = '0.8.7'
toolVersion = '0.8.8'
}

checkstyle {
configDirectory.set(rootProject.file('src/checkstyle'))
toolVersion = '10.7.0'
toolVersion = '10.8.0'
}

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

optionalApi 'io.awspring.cloud:spring-cloud-aws-messaging'
optionalApi 'io.awspring.cloud:spring-cloud-aws-sns'
optionalApi 'io.awspring.cloud:spring-cloud-aws-sqs'
optionalApi 'io.awspring.cloud:spring-cloud-aws-s3'
optionalApi 'org.springframework.integration:spring-integration-file'
optionalApi 'org.springframework.integration:spring-integration-http'

optionalApi "com.amazonaws:amazon-kinesis-client:$kinesisClientVersion"
optionalApi "software.amazon.kinesis:amazon-kinesis-client:$kinesisClientVersion"
optionalApi "com.amazonaws:amazon-kinesis-producer:$kinesisProducerVersion"

optionalApi 'com.amazonaws:aws-java-sdk-kinesis'
optionalApi 'com.amazonaws:aws-java-sdk-dynamodb'
optionalApi 'software.amazon.awssdk:kinesis'
optionalApi 'software.amazon.awssdk:dynamodb'
optionalApi 'software.amazon.awssdk:s3-transfer-manager'

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

testImplementation ('org.springframework.integration:spring-integration-test') {
testImplementation('org.springframework.integration:spring-integration-test') {
exclude group: 'junit'
}

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

testImplementation ("org.awaitility:awaitility:$awaitilityVersion") {
testImplementation("org.awaitility:awaitility:$awaitilityVersion") {
exclude group: 'org.hamcrest'
}
testImplementation 'org.junit.jupiter:junit-jupiter-api'
Expand Down Expand Up @@ -177,16 +182,16 @@ test {
jacoco {
destinationFile = file("$buildDir/jacoco.exec")
}
useJUnitPlatform()
// suppress all console output during testing unless running `gradle -i`
logging.captureStandardOutput(LogLevel.INFO)
useJUnitPlatform()
// suppress all console output during testing unless running `gradle -i`
logging.captureStandardOutput(LogLevel.INFO)
}

jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("$buildDir/reports/jacoco/html")
csv.required = false
html.required = false
xml.outputLocation = file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
}
}

Expand Down Expand Up @@ -237,32 +242,6 @@ sonarqube {
}
}

task schemaZip(type: Zip) {
group = 'Distribution'
archiveClassifier = 'schema'
description = "Builds -${archiveClassifier} archive containing all " +
"XSDs for deployment at static.springframework.org/schema."

duplicatesStrategy = DuplicatesStrategy.EXCLUDE

Properties schemas = new Properties();
def shortName = idPrefix.replaceFirst("${idPrefix}-", '')

project.sourceSets.main.resources.find {
it.path.endsWith("META-INF${File.separator}spring.schemas")
}?.withInputStream { schemas.load(it) }

for (def key : schemas.keySet()) {
File xsdFile = project.sourceSets.main.resources.find {
it.path.replaceAll('\\\\', '/').endsWith(schemas.get(key))
}
assert xsdFile != null
into("integration/${shortName}") {
from xsdFile.path
}
}
}

task docsZip(type: Zip) {
group = 'Distribution'
archiveClassifier = 'docs'
Expand All @@ -278,7 +257,7 @@ task docsZip(type: Zip) {
}
}

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

from(zipTree(schemaZip.archiveFile)) {
into "${baseDir}/schema"
}

into("${baseDir}/libs") {
from project.jar
from project.sourcesJar
Expand All @@ -310,7 +285,7 @@ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {

task dist(dependsOn: assemble) {
group = 'Distribution'
description = 'Builds -dist, -docs and -schema distribution archives.'
description = 'Builds -dist and -docs distribution archives.'
}

apply from: "${rootProject.projectDir}/publish-maven.gradle"
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b
4 changes: 2 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down
3 changes: 1 addition & 2 deletions publish-maven.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ publishing {
suppressAllPomMetadataWarnings()
from components.java
artifact docsZip
artifact schemaZip
artifact distZip
pom {
afterEvaluate {
Expand Down Expand Up @@ -34,7 +33,7 @@ publishing {
developer {
id = 'artembilan'
name = 'Artem Bilan'
email = 'abilan@pivotal.io'
email = 'abilan@vmware.com'
roles = ['project lead']
}
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f4138be

Please sign in to comment.