From 11b87034c55fee55103aed566a3a859ebc07a923 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 15 May 2014 15:09:37 +0300 Subject: [PATCH] Add the Spring IO Platform plugin INT-3396: Polishing JIRA: https://jira.spring.io/browse/INT-3396 Updates for latest snapshots of the Spring IO plugin Update the configuration to use the renamed plugin. Add a dependency in the springIoVersions configuration that points to the versions published by Spring IO. Upgrade to 0.0.3.RELEASE Upgrade the plugin version to 0.0.3.RELEASE. Only apply the plugin if the platformVersion property has been set. Polishing following upgrade to 0.0.3.RELEASE - Remove reference to snapshot plugins repository - Remove unnessary use of the springIoVersions configuration Improve configuration of snapshot repository Upgrade to latest SD to be consistent with IO --- build.gradle | 78 ++++++++++--------- .../AggregatorWithRedisLocksTests-context.xml | 18 ++--- 2 files changed, 51 insertions(+), 45 deletions(-) diff --git a/build.gradle b/build.gradle index 3d203d0fd6..da964c918d 100644 --- a/build.gradle +++ b/build.gradle @@ -8,6 +8,7 @@ buildscript { maven { url 'http://repo.spring.io/plugins-release' } } dependencies { + classpath 'org.springframework.build.gradle:spring-io-plugin:0.0.3.RELEASE' classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.2.8' } } @@ -25,7 +26,7 @@ allprojects { group = 'org.springframework.integration' repositories { - if (version.endsWith('BUILD-SNAPSHOT')) { + if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) { maven { url 'http://repo.spring.io/libs-snapshot' } } maven { url 'http://repo.spring.io/libs-milestone' } @@ -54,6 +55,14 @@ subprojects { subproject -> apply plugin: 'eclipse' apply plugin: 'idea' + if (project.hasProperty('platformVersion')) { + apply plugin: 'spring-io' + + dependencies { + springIoVersions "io.spring.platform:platform-versions:${platformVersion}@properties" + } + } + sourceCompatibility=1.6 targetCompatibility=1.6 @@ -99,9 +108,9 @@ subprojects { subproject -> slf4jVersion = "1.7.6" smackVersion = '3.2.1' springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '1.3.2.RELEASE' - springDataMongoVersion = '1.4.2.RELEASE' - springDataRedisVersion = '1.2.1.RELEASE' - springGemfireVersion = '1.3.4.RELEASE' + springDataMongoVersion = '1.5.0.BUILD-SNAPSHOT' + springDataRedisVersion = '1.3.0.BUILD-SNAPSHOT' + springGemfireVersion = '1.4.0.BUILD-SNAPSHOT' springSecurityVersion = '3.2.3.RELEASE' springSocialTwitterVersion = '1.1.0.RELEASE' springRetryVersion = '1.1.0.RELEASE' @@ -152,29 +161,6 @@ subprojects { subproject -> ext.xLintArg = '-Xlint:all,-options' [compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg] - 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=org.springframework.integration.*" - } - - task testAll() { - doFirst { - tasks.test.systemProperty 'RUN_LONG_INTEGRATION_TESTS', 'true' - } - finalizedBy test - } - - task sourcesJar(type: Jar) { - classifier = 'sources' - from sourceSets.main.allJava - } - - task javadocJar(type: Jar) { - classifier = 'javadoc' - from javadoc - } - task checkTestConfigs { doLast { def configFiles = [] @@ -190,12 +176,37 @@ subprojects { subproject -> if (configFiles) { throw new InvalidUserDataException('Hardcoded XSD version in the config files:\n' + configFiles.collect {relativePath(it)}.join('\n') + - '\nPlease, use versionless schemaLocations for Spring XSDs to avoid issues with builds on different versions of dependencies.') + '\nPlease, use versionless schemaLocations for Spring XSDs to avoid issues with builds ' + + 'on different versions of dependencies.') } } } - test.dependsOn checkTestConfigs + test { + jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.integration.*" + } + + task testAll(type: Test) + + tasks.withType(Test).all { + // suppress all console output during testing unless running `gradle -i` + logging.captureStandardOutput(LogLevel.INFO) + dependsOn checkTestConfigs + + if (name ==~ /(springIo.*)|(testAll)/) { + systemProperty 'RUN_LONG_INTEGRATION_TESTS', 'true' + } + } + + task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allJava + } + + task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc + } artifacts { archives sourcesJar @@ -285,7 +296,7 @@ project('spring-integration-ftp') { project('spring-integration-gemfire') { description = 'Spring Integration GemFire Support' - test { + tasks.withType(Test).matching {it.name ==~ /(springIo.+)|(test)|(testAll)/}.all { forkEvery = 1 systemProperties['gemfire.disableShutdownHook'] = 'true' } @@ -422,11 +433,8 @@ project('spring-integration-jpa') { //Suppress openjpa annotation processor warnings compileTestJava.options.compilerArgs = ["${xLintArg},-processing"] - test.doFirst { - def javaAgents = configurations.testRuntime.resolvedConfiguration.resolvedArtifacts - .findAll { it.name in ['spring-instrument', 'openjpa'] } - .collect { "-javaagent:${it.file}" } - jvmArgs javaAgents + tasks.withType(Test).matching {it.name ==~ /(springIo.+)|(test)|(testAll)/}.all { + jvmArgs classpath.files.findAll{it.name ==~ /(spring-instrument.+)|(openjpa.+)/}.collect{"-javaagent:$it"} } } diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/util/AggregatorWithRedisLocksTests-context.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/util/AggregatorWithRedisLocksTests-context.xml index f03a674dc8..b40cf5467e 100644 --- a/spring-integration-redis/src/test/java/org/springframework/integration/redis/util/AggregatorWithRedisLocksTests-context.xml +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/util/AggregatorWithRedisLocksTests-context.xml @@ -11,12 +11,14 @@ + + + + + + - - - - - + @@ -27,11 +29,7 @@ expire-groups-upon-completion="true" lock-registry="redisLockRegistry2" /> - - - - - +