Upgrade dependencies; compatibility with SI 5.2

This commit is contained in:
Artem Bilan
2019-10-31 11:14:49 -04:00
parent 4024a0db70
commit 442463ad8f
7 changed files with 60 additions and 15 deletions

View File

@@ -13,7 +13,7 @@ plugins {
id 'idea'
id 'jacoco'
id 'checkstyle'
id 'org.sonarqube' version '2.7'
id 'org.sonarqube' version '2.8'
}
description = 'Spring Integration SMB Support'
@@ -42,9 +42,9 @@ compileTestJava {
ext {
idPrefix = 'smb'
jcifsVersion = '2.1.8'
log4jVersion = '2.11.2'
springIntegrationVersion = '5.2.0.BUILD-SNAPSHOT'
jcifsVersion = '2.1.11'
log4jVersion = '2.12.1'
springIntegrationVersion = '5.2.1.BUILD-SNAPSHOT'
linkHomepage = 'https://github.com/SpringSource/spring-integration-extensions'
@@ -67,12 +67,12 @@ sourceSets {
}
jacoco {
toolVersion = "0.8.2"
toolVersion = '0.8.4'
}
checkstyle {
configFile = file("$rootDir/src/checkstyle/checkstyle.xml")
toolVersion = "8.19"
toolVersion = '8.25'
}
dependencies {
@@ -81,7 +81,7 @@ dependencies {
testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion"
testRuntime "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
// testRuntime "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
testRuntime "org.apache.logging.log4j:log4j-jcl:$log4jVersion"
}
@@ -92,14 +92,14 @@ jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/reports/jacoco/html"
html.destination file("${buildDir}/reports/jacoco/html")
}
}
test {
// suppress all console output during testing unless running `gradle -i`
logging.captureStandardOutput(LogLevel.INFO)
maxHeapSize = "1024m"
maxHeapSize = '1024m'
jacoco {
append = false
destinationFile = file("$buildDir/jacoco.exec")

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -1,5 +1,21 @@
#!/usr/bin/env sh
#
# Copyright 2015 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.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

View File

@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

View File

@@ -59,4 +59,9 @@ public class SmbInboundFileSynchronizer extends AbstractInboundFileSynchronizer<
return file.getLastModified();
}
@Override
protected String protocol() {
return "smb";
}
}

View File

@@ -22,6 +22,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.Arrays;
import org.apache.commons.logging.Log;
@@ -273,7 +274,8 @@ public class SmbSession implements Session<SmbFile> {
if (!dir.exists()) {
dir.mkdirs();
if (logger.isInfoEnabled()) {
logger.info("Successfully created remote directory [" + _path + "] in share [" + this.smbShare + "].");
logger.info("Successfully created remote directory [" + _path + "] in share [" + this.smbShare + "]" +
".");
}
}
else {
@@ -495,6 +497,12 @@ public class SmbSession implements Session<SmbFile> {
return createSmbFileObject(_path, true);
}
@Override
public String getHostPort() {
URL url = this.smbShare.getURL();
return url.getHost() + ":" + url.getPort();
}
@Override
public String[] listNames(String path) {
throw new UnsupportedOperationException("Not implemented yet");