diff --git a/build.gradle b/build.gradle index 218a940..7e4254e 100644 --- a/build.gradle +++ b/build.gradle @@ -8,17 +8,16 @@ buildscript { } plugins { - id "org.sonarqube" version "1.2" + id 'java' + id 'eclipse' + id 'idea' + id 'jacoco' + id 'org.sonarqube' version '1.2' + id 'checkstyle' } - description = 'Spring Integration AWS Support' -apply plugin: 'java' apply from: "${rootProject.projectDir}/publish-maven.gradle" -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'jacoco' -apply plugin: 'checkstyle' group = 'org.springframework.integration' @@ -56,7 +55,7 @@ ext { servletApiVersion = '3.1.0' slf4jVersion = '1.7.21' springCloudAwsVersion = '1.1.1.RELEASE' - springIntegrationVersion = '4.3.1.RELEASE' + springIntegrationVersion = '4.3.2.RELEASE' idPrefix = 'aws' @@ -77,8 +76,8 @@ jacoco { } checkstyle { - configFile = file('src/checkstyle/checkstyle.xml') - toolVersion = "7.1" + configFile = file("${rootDir}/src/checkstyle/checkstyle.xml") + toolVersion = "6.16.1" } dependencies { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d3b8398..6ffa237 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 a09eb8a..cf84e25 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Jun 23 12:52:13 EDT 2016 +#Mon Sep 19 16:49:42 EDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip diff --git a/gradlew b/gradlew index 27309d9..9aa616c 100755 --- a/gradlew +++ b/gradlew @@ -161,4 +161,9 @@ function splitJvmOpts() { eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then + cd "$(dirname "$0")" +fi + exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat index f6d5974..e95643d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -49,7 +49,6 @@ goto fail @rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml index 827fb7d..810daf0 100644 --- a/src/checkstyle/checkstyle.xml +++ b/src/checkstyle/checkstyle.xml @@ -68,7 +68,6 @@ - diff --git a/src/main/java/org/springframework/integration/aws/inbound/S3InboundFileSynchronizer.java b/src/main/java/org/springframework/integration/aws/inbound/S3InboundFileSynchronizer.java index e6d02f9..da05bbc 100644 --- a/src/main/java/org/springframework/integration/aws/inbound/S3InboundFileSynchronizer.java +++ b/src/main/java/org/springframework/integration/aws/inbound/S3InboundFileSynchronizer.java @@ -16,11 +16,15 @@ package org.springframework.integration.aws.inbound; +import org.springframework.expression.Expression; import org.springframework.expression.common.LiteralExpression; import org.springframework.integration.aws.support.S3SessionFactory; +import org.springframework.integration.aws.support.filters.S3PersistentAcceptOnceFileListFilter; +import org.springframework.integration.file.filters.FileListFilter; import org.springframework.integration.file.remote.session.Session; import org.springframework.integration.file.remote.session.SessionFactory; import org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer; +import org.springframework.integration.metadata.SimpleMetadataStore; import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.model.S3ObjectSummary; @@ -47,6 +51,17 @@ public class S3InboundFileSynchronizer extends AbstractInboundFileSynchronizer sessionFactory) { super(sessionFactory); setRemoteDirectoryExpression(new LiteralExpression(null)); + setFilter(new S3PersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "s3MessageSource")); + } + + @Override + public final void setRemoteDirectoryExpression(Expression remoteDirectoryExpression) { + super.setRemoteDirectoryExpression(remoteDirectoryExpression); + } + + @Override + public final void setFilter(FileListFilter filter) { + super.setFilter(filter); } @Override diff --git a/src/main/java/org/springframework/integration/aws/support/S3FileInfo.java b/src/main/java/org/springframework/integration/aws/support/S3FileInfo.java index ab4c234..6628b35 100644 --- a/src/main/java/org/springframework/integration/aws/support/S3FileInfo.java +++ b/src/main/java/org/springframework/integration/aws/support/S3FileInfo.java @@ -25,7 +25,9 @@ import com.amazonaws.services.s3.model.S3ObjectSummary; /** * An Amazon S3 {@link org.springframework.integration.file.remote.FileInfo} implementation. + * * @author Christian Tzolov + * * @since 1.1 */ public class S3FileInfo extends AbstractFileInfo {