diff --git a/spring-integration-smb/.travis.yml b/spring-integration-smb/.travis.yml new file mode 100644 index 0000000..aa1ed9e --- /dev/null +++ b/spring-integration-smb/.travis.yml @@ -0,0 +1,12 @@ +language: java +jdk: oraclejdk8 +sudo: false +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock +cache: + directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ +install: true +script: + - ./gradlew check --no-daemon diff --git a/spring-integration-smb/README.md b/spring-integration-smb/README.md index 9a5e40c..aecf634 100644 --- a/spring-integration-smb/README.md +++ b/spring-integration-smb/README.md @@ -3,7 +3,7 @@ Spring Integration Smb Support ## Introduction -This module add Spring Integration* support for [Server Message Block][] (SMB). +This module add Spring Integration support for [Server Message Block][] (SMB). [Server Message Block]: http://en.wikipedia.org/wiki/Server_Message_Block diff --git a/spring-integration-smb/build.gradle b/spring-integration-smb/build.gradle index 479fe42..8585eae 100644 --- a/spring-integration-smb/build.gradle +++ b/spring-integration-smb/build.gradle @@ -1,43 +1,62 @@ -description = 'Spring Integration SMB Support' - buildscript { repositories { - maven { url 'https://repo.springsource.org/plugins-snapshot' } + maven { url 'https://repo.spring.io/plugins-release' } } dependencies { - classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.1.5' + classpath 'io.spring.gradle:dependency-management-plugin:1.0.0.RC2' + classpath 'io.spring.gradle:spring-io-plugin:0.0.6.RELEASE' + classpath 'io.spring.gradle:docbook-reference-plugin:0.3.1' } } -apply plugin: 'java' +plugins { + id 'java' + id 'eclipse' + id 'idea' + id 'jacoco' + id 'checkstyle' + id 'org.sonarqube' version '2.1' +} + +description = 'Spring Integration SMB Support' + apply from: "${rootProject.projectDir}/publish-maven.gradle" -apply plugin: 'eclipse' -apply plugin: 'idea' group = 'org.springframework.integration' repositories { - maven { url 'http://repo.springsource.org/libs-milestone' } - maven { url 'http://repo.springsource.org/plugins-release' } // for bundlor + if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) { + maven { url 'http://repo.spring.io/libs-snapshot' } + } + maven { url 'http://repo.spring.io/libs-milestone' } } -// ensure JDK 5 compatibility (GRADLE-18; INT-1578) -sourceCompatibility=1.6 -targetCompatibility=1.6 +if (project.hasProperty('platformVersion')) { + apply plugin: 'spring-io' + + dependencyManagement { + springIoTestRuntime { + imports { + mavenBom "io.spring.platform:platform-bom:${platformVersion}" + } + } + } +} + +compileJava { + sourceCompatibility = 1.7 + targetCompatibility = 1.7 +} + +compileTestJava { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 +} ext { - aspectjVersion = '1.6.8' - cglibVersion = '2.2' - commonsNetVersion = '3.0.1' - groovyVersion = '1.8.5' - jacksonVersion = '1.9.2' - javaxActivationVersion = '1.1.1' - junitVersion = '4.11' - log4jVersion = '1.2.12' - mockitoVersion = '1.9.0' - - springVersion = '3.1.3.RELEASE' - springIntegrationVersion = '2.2.1.RELEASE' + jcifsVersion = '1.3.18.2' + log4jVersion = '1.2.17' + springIntegrationVersion = '4.3.6.RELEASE' idPrefix = 'smb' @@ -50,24 +69,7 @@ ext { } -dependencies { - - compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion" - compile "org.springframework.integration:spring-integration-file:$springIntegrationVersion" - compile "org.springframework.integration:spring-integration-stream:$springIntegrationVersion" - compile "jcifs:jcifs:1.3.17" - compile "org.springframework:spring-context-support:$springVersion" - compile("javax.activation:activation:$javaxActivationVersion", optional) - testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion" - -} - - -eclipse { - project { - natures += 'org.springframework.ide.eclipse.core.springnature' - } -} +eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature' sourceSets { test { @@ -77,31 +79,43 @@ sourceSets { } } -// See http://www.gradle.org/docs/current/userguide/dependency_management.html#sub:configurations -// and http://www.gradle.org/docs/current/dsl/org.gradle.api.artifacts.ConfigurationContainer.html -configurations { - jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo +jacoco { + toolVersion = "0.7.8" +} + +checkstyle { + configFile = file("$rootDir/src/checkstyle/checkstyle.xml") + toolVersion = "6.16.1" } -// dependencies that are common across all java projects dependencies { - testCompile "cglib:cglib-nodep:$cglibVersion" - testCompile "junit:junit-dep:$junitVersion" - testCompile "log4j:log4j:$log4jVersion" - testCompile "org.hamcrest:hamcrest-all:1.1" - testCompile "org.mockito:mockito-all:$mockitoVersion" - testCompile "org.springframework:spring-test:$springVersion" - jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.5.6.201201232323", classifier: "runtime" + compile "org.codelibs:jcifs:$jcifsVersion" + compile "org.springframework.integration:spring-integration-file:$springIntegrationVersion" + compile "org.springframework.integration:spring-integration-stream:$springIntegrationVersion" + + testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion" + testRuntime "log4j:log4j:$log4jVersion" } // enable all compiler warnings; individual projects may customize further -ext.xLintArg = '-Xlint:all' -[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg] +[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all,-options,-processing'] + +jacocoTestReport { + reports { + xml.enabled false + csv.enabled false + html.destination "${buildDir}/reports/jacoco/html" + } +} test { // suppress all console output during testing unless running `gradle -i` logging.captureStandardOutput(LogLevel.INFO) - jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=*" + maxHeapSize = "1024m" + jacoco { + append = false + destinationFile = file("$buildDir/jacoco.exec") + } } task sourcesJar(type: Jar) { @@ -125,10 +139,8 @@ reference { sourceDir = file('src/reference/docbook') } -apply plugin: 'sonar-runner' - -sonarRunner { - sonarProperties { +sonarqube { + properties { property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec" property "sonar.links.homepage", linkHomepage property "sonar.links.ci", linkCi @@ -150,7 +162,7 @@ task api(type: Javadoc) { source = sourceSets.main.allJava classpath = project.sourceSets.main.compileClasspath - destinationDir = new File(buildDir, "api") + destinationDir = file("$buildDir/api") } task schemaZip(type: Zip) { @@ -163,15 +175,15 @@ task schemaZip(type: Zip) { def shortName = idPrefix.replaceFirst("${idPrefix}-", '') project.sourceSets.main.resources.find { - it.path.endsWith('META-INF/spring.schemas') + 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.endsWith(schemas.get(key)) + it.path.replaceAll('\\\\', '/').endsWith(schemas.get(key)) } assert xsdFile != null - into ("integration/${shortName}") { + into("integration/${shortName}") { from xsdFile.path } } @@ -266,8 +278,3 @@ task dist(dependsOn: assemble) { group = 'Distribution' description = 'Builds -dist, -docs and -schema distribution archives.' } - -task wrapper(type: Wrapper) { - description = 'Generates gradlew[.bat] scripts' - gradleVersion = '1.6' -} diff --git a/spring-integration-smb/gradle.properties b/spring-integration-smb/gradle.properties index bebfcbc..5364470 100644 --- a/spring-integration-smb/gradle.properties +++ b/spring-integration-smb/gradle.properties @@ -1 +1 @@ -version=1.0.0.BUILD-SNAPSHOT +version=0.5.0.BUILD-SNAPSHOT diff --git a/spring-integration-smb/gradle/wrapper/gradle-wrapper.jar b/spring-integration-smb/gradle/wrapper/gradle-wrapper.jar index a7634b0..cf7c6b9 100644 Binary files a/spring-integration-smb/gradle/wrapper/gradle-wrapper.jar and b/spring-integration-smb/gradle/wrapper/gradle-wrapper.jar differ diff --git a/spring-integration-smb/gradle/wrapper/gradle-wrapper.properties b/spring-integration-smb/gradle/wrapper/gradle-wrapper.properties index 426d227..0cbb8f5 100644 --- a/spring-integration-smb/gradle/wrapper/gradle-wrapper.properties +++ b/spring-integration-smb/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed May 15 22:13:48 EDT 2013 +#Mon Jan 16 10:37:27 EST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip diff --git a/spring-integration-smb/gradlew b/spring-integration-smb/gradlew index 91a7e26..4453cce 100755 --- a/spring-integration-smb/gradlew +++ b/spring-integration-smb/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -6,12 +6,30 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null 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="" + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -30,6 +48,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +59,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +89,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -114,6 +113,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` @@ -154,11 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save ( ) { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# 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" "$@" diff --git a/spring-integration-smb/gradlew.bat b/spring-integration-smb/gradlew.bat index aec9973..e95643d 100644 --- a/spring-integration-smb/gradlew.bat +++ b/spring-integration-smb/gradlew.bat @@ -8,14 +8,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@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 DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. 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= + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +46,9 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@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/spring-integration-smb/publish-maven.gradle b/spring-integration-smb/publish-maven.gradle index 06eb14e..fe5dd02 100644 --- a/spring-integration-smb/publish-maven.gradle +++ b/spring-integration-smb/publish-maven.gradle @@ -31,10 +31,10 @@ def customizePom(pom, gradleProject) { generatedPom.project { name = gradleProject.description description = gradleProject.description - url = 'https://github.com/SpringSource/spring-integration-extensions' + url = linkHomepage organization { - name = 'SpringSource' - url = 'http://springsource.org' + name = 'SpringIO' + url = 'http://spring.io' } licenses { license { @@ -43,19 +43,37 @@ def customizePom(pom, gradleProject) { distribution 'repo' } } + scm { - url = 'https://github.com/SpringSource/spring-integration-extensions' - connection = 'scm:git:git://github.com/SpringSource/spring-integration-extensions' - developerConnection = 'scm:git:git://github.com/SpringSource/spring-integration-extensions' + url = linkScmUrl + connection = 'scm:git:' + linkScmConnection + developerConnection = 'scm:git:' + linkScmDevConnection + } + + issueManagement { + system = "Jira" + url = linkIssue } developers { developer { - id = 'not specified' - name = 'Markus Spann' - email = 'not specified' + id = 'garyrussell' + name = 'Gary Russell' + email = 'grussell@pivotal.io' + roles = ["project lead"] + } + developer { + id = 'ghillert' + name = 'Gunnar Hillert' + email = 'ghillert@pivotal.io' + } + developer { + id = 'abilan' + name = 'Artem Bilan' + email = 'abilan@pivotal.io' } } } } } + diff --git a/spring-integration-smb/settings.gradle b/spring-integration-smb/settings.gradle new file mode 100644 index 0000000..8e5f6a5 --- /dev/null +++ b/spring-integration-smb/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'spring-integration-smb' diff --git a/spring-integration-smb/src/api/overview.html b/spring-integration-smb/src/api/overview.html index fb0198b..61bbef4 100644 --- a/spring-integration-smb/src/api/overview.html +++ b/spring-integration-smb/src/api/overview.html @@ -5,7 +5,7 @@ This document is the API specification for Spring Integration
For further API reference and developer documentation, see the - Spring + Spring Integration reference documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, @@ -14,8 +14,8 @@ This document is the API specification for Spring Integration
If you are interested in commercial training, consultancy, and - support for Spring Integration, please visit - http://www.springsource.com + support for Spring Integration, please visit + https://spring.io