diff --git a/build.gradle b/build.gradle index 3cc4cd3..7d8031e 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,7 @@ buildscript { maven { url 'http://repo.spring.io/plugins-release' } } dependencies { - classpath 'io.spring.gradle:dependency-management-plugin:1.0.5.RELEASE' - classpath 'io.spring.gradle:spring-io-plugin:0.0.8.RELEASE' + classpath 'io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE' } } @@ -24,20 +23,20 @@ group = 'org.springframework.integration' repositories { // maven { url 'http://repo.spring.io/libs-staging-local' } - if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) { + if (version.endsWith('BUILD-SNAPSHOT')) { maven { url 'https://repo.spring.io/libs-snapshot' } } maven { url 'http://repo.spring.io/libs-milestone' } } ext { - assertjVersion = '3.10.0' + assertjVersion = '3.11.1' dynamodbLockClientVersion = '1.0.0' - jacksonVersion = '2.9.6' - servletApiVersion = '3.1.0' - log4jVersion = '2.11.0' - springCloudAwsVersion = '2.0.0.RELEASE' - springIntegrationVersion = '5.0.7.RELEASE' + jacksonVersion = '2.9.7' + servletApiVersion = '4.0.0' + log4jVersion = '2.11.1' + springCloudAwsVersion = '2.1.0.BUILD-SNAPSHOT' + springIntegrationVersion = '5.1.0.RELEASE' idPrefix = 'aws' @@ -68,41 +67,28 @@ sourceSets { apply plugin: 'io.spring.dependency-management' -if (project.hasProperty('platformVersion')) { - apply plugin: 'spring-io' -} - dependencyManagement { imports { mavenBom "org.springframework.cloud:spring-cloud-aws-dependencies:$springCloudAwsVersion" mavenBom "org.springframework.integration:spring-integration-bom:$springIntegrationVersion" } - - if (project.hasProperty('platformVersion')) { - springIoTestRuntime { - imports { - mavenBom "io.spring.platform:platform-bom:$platformVersion" - } - } - } } jacoco { - toolVersion = "0.7.9" + toolVersion = "0.8.2" } checkstyle { configFile = file("${rootDir}/src/checkstyle/checkstyle.xml") - toolVersion = "8.11" + toolVersion = "8.14" } dependencies { compile 'org.springframework.integration:spring-integration-core' + compile 'org.springframework.cloud:spring-cloud-aws-core' compile("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion", optional) - compile 'org.springframework.cloud:spring-cloud-aws-core' - compile('org.springframework.cloud:spring-cloud-aws-messaging', optional) compile('org.springframework.integration:spring-integration-file', optional) compile('org.springframework.integration:spring-integration-http', optional) diff --git a/gradle.properties b/gradle.properties index 182941a..331739f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -version=2.0.1.BUILD-SNAPSHOT +version=2.1.0.BUILD-SNAPSHOT diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 0d4a951..29953ea 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a95009c..e0b3fb8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/org/springframework/integration/aws/inbound/S3StreamingMessageSource.java b/src/main/java/org/springframework/integration/aws/inbound/S3StreamingMessageSource.java index 52d6908..b51db0e 100644 --- a/src/main/java/org/springframework/integration/aws/inbound/S3StreamingMessageSource.java +++ b/src/main/java/org/springframework/integration/aws/inbound/S3StreamingMessageSource.java @@ -46,7 +46,7 @@ public class S3StreamingMessageSource extends AbstractRemoteFileStreamingMessage } public S3StreamingMessageSource(RemoteFileTemplate template, - Comparator> comparator) { + Comparator comparator) { super(template, comparator); diff --git a/src/main/java/org/springframework/integration/aws/support/AbstractMessageAttributesHeaderMapper.java b/src/main/java/org/springframework/integration/aws/support/AbstractMessageAttributesHeaderMapper.java index a8df5af..be735f3 100644 --- a/src/main/java/org/springframework/integration/aws/support/AbstractMessageAttributesHeaderMapper.java +++ b/src/main/java/org/springframework/integration/aws/support/AbstractMessageAttributesHeaderMapper.java @@ -26,7 +26,7 @@ import org.apache.commons.logging.LogFactory; import org.springframework.cloud.aws.messaging.core.MessageAttributeDataTypes; import org.springframework.integration.mapping.HeaderMapper; -import org.springframework.integration.util.PatternMatchUtils; +import org.springframework.integration.support.utils.PatternMatchUtils; import org.springframework.messaging.MessageHeaders; import org.springframework.util.Assert; import org.springframework.util.MimeType; diff --git a/src/test/java/org/springframework/integration/aws/inbound/S3StreamingChannelAdapterTests.java b/src/test/java/org/springframework/integration/aws/inbound/S3StreamingChannelAdapterTests.java index 6f2f9a6..d8d3b68 100644 --- a/src/test/java/org/springframework/integration/aws/inbound/S3StreamingChannelAdapterTests.java +++ b/src/test/java/org/springframework/integration/aws/inbound/S3StreamingChannelAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2017 the original author or authors. + * Copyright 2016-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Comparator; import java.util.Date; @@ -48,7 +49,6 @@ import org.springframework.integration.aws.support.filters.S3PersistentAcceptOnc import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.config.EnableIntegration; import org.springframework.integration.file.FileHeaders; -import org.springframework.integration.file.remote.FileInfo; import org.springframework.integration.metadata.SimpleMetadataStore; import org.springframework.messaging.Message; import org.springframework.messaging.PollableChannel; @@ -114,14 +114,14 @@ public class S3StreamingChannelAdapterTests { InputStream inputStreamA = (InputStream) message.getPayload(); assertThat(inputStreamA).isNotNull(); - assertThat(IOUtils.toString(inputStreamA)).isEqualTo("Hello"); + assertThat(IOUtils.toString(inputStreamA, Charset.defaultCharset())).isEqualTo("Hello"); message = this.s3FilesChannel.receive(10000); assertThat(message).isNotNull(); assertThat(message.getPayload()).isInstanceOf(InputStream.class); assertThat(message.getHeaders().get(FileHeaders.REMOTE_FILE)).isEqualTo("subdir/b.test"); InputStream inputStreamB = (InputStream) message.getPayload(); - assertThat(IOUtils.toString(inputStreamB)).isEqualTo("Bye"); + assertThat(IOUtils.toString(inputStreamB, Charset.defaultCharset())).isEqualTo("Bye"); assertThat(this.s3FilesChannel.receive(10)).isNull(); } @@ -161,9 +161,10 @@ public class S3StreamingChannelAdapterTests { S3SessionFactory s3SessionFactory = new S3SessionFactory(amazonS3); S3RemoteFileTemplate s3FileTemplate = new S3RemoteFileTemplate(s3SessionFactory); S3StreamingMessageSource s3MessageSource = new S3StreamingMessageSource(s3FileTemplate, - Comparator.comparing(FileInfo::getFilename)); + Comparator.comparing(S3ObjectSummary::getKey)); s3MessageSource.setRemoteDirectory("/" + S3_BUCKET + "/subdir"); - s3MessageSource.setFilter(new S3PersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "streaming")); + s3MessageSource.setFilter(new S3PersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "streaming" + )); return s3MessageSource; }