diff --git a/build.gradle b/build.gradle index db985ba687..b87537373f 100644 --- a/build.gradle +++ b/build.gradle @@ -3,20 +3,18 @@ buildscript { maven { url 'https://repo.spring.io/plugins-release' } } dependencies { - classpath 'io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE' - classpath 'io.spring.gradle:spring-io-plugin:0.0.8.RELEASE' classpath 'io.spring.gradle:docbook-reference-plugin:0.3.1' - classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0' + classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3' } } plugins { - id 'org.sonarqube' version '2.6.1' + id 'org.sonarqube' version '2.6.2' } description = 'Spring Integration' -def docsDir = 'src/reference/asciidoc' // Will be default with newer asciidoctor plugin +def docsDir = 'src/reference/asciidoc' ext { linkHomepage = 'https://projects.spring.io/spring-integration' @@ -31,10 +29,10 @@ allprojects { group = 'org.springframework.integration' repositories { - if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) { + maven { url 'https://repo.spring.io/libs-milestone' } + if (version.endsWith('BUILD-SNAPSHOT')) { maven { url 'https://repo.spring.io/libs-snapshot' } } - maven { url 'https://repo.spring.io/libs-milestone' } // maven { url 'https://repo.spring.io/libs-staging-local' } } @@ -69,70 +67,57 @@ subprojects { subproject -> } } - if (project.hasProperty('platformVersion') && !(subproject.name ==~ /.*-bom/)) { - apply plugin: 'spring-io' - - dependencyManagement { - springIoTestRuntime { - imports { - mavenBom "io.spring.platform:platform-bom:${platformVersion}" - } - } - } - } - compileJava { sourceCompatibility = 1.8 targetCompatibility = 1.8 } ext { - activeMqVersion = '5.15.2' - apacheSshdVersion = '1.6.0' - aspectjVersion = '1.8.13' + activeMqVersion = '5.15.3' + apacheSshdVersion = '1.7.0' + aspectjVersion = '1.9.0' assertjVersion = '3.9.1' boonVersion = '0.34' - commonsDbcp2Version = '2.1.1' - commonsIoVersion = '2.4' - commonsNetVersion = '3.5' - curatorVersion = '2.11.1' + commonsDbcp2Version = '2.2.0' + commonsIoVersion = '2.6' + commonsNetVersion = '3.6' + curatorVersion = '4.0.1' derbyVersion = '10.13.1.1' - eclipseLinkVersion = '2.6.4' + eclipseLinkVersion = '2.7.1' ftpServerVersion = '1.1.1' - groovyVersion = '2.4.12' + groovyVersion = '2.4.15' guavaVersion = '20.0' hamcrestVersion = '1.3' hazelcastVersion = '3.8' - hibernateVersion = '5.2.10.Final' + hibernateVersion = '5.2.16.Final' hsqldbVersion = '2.4.0' h2Version = '1.4.197' - jackson2Version = '2.9.4' + jackson2Version = '2.9.5' javaxActivationVersion = '1.1.1' - javaxMailVersion = '1.6.0' + javaxMailVersion = '1.6.1' jedisVersion = '2.9.0' jmsApiVersion = '2.0.1' jpa21ApiVersion = '1.0.0.Final' jpaApiVersion = '2.1.1' - jrubyVersion = '9.1.5.0' + jrubyVersion = '9.1.16.0' jschVersion = '0.1.54' jsonpathVersion = '2.4.0' junit4Version = '4.12' - junitJupiterVersion = '5.1.0' - junitPlatformVersion = '1.1.0' - junitVintageVersion = '5.1.0' + junitJupiterVersion = '5.1.1' + junitPlatformVersion = '1.1.1' jythonVersion = '2.5.3' kryoShadedVersion = '3.0.3' log4jVersion = '2.11.0' micrometerVersion = '1.0.3' - mockitoVersion = '2.11.0' - mysqlVersion = '6.0.6' + mockitoVersion = '2.18.0' + mysqlVersion = '8.0.11' pahoMqttClientVersion = '1.2.0' postgresVersion = '42.0.0' - reactorNettyVersion = '0.7.6.BUILD-SNAPSHOT' + reactorNettyVersion = '0.7.7.BUILD-SNAPSHOT' reactorVersion = '3.2.0.BUILD-SNAPSHOT' - romeToolsVersion = '1.8.0' + romeToolsVersion = '1.9.0' servletApiVersion = '4.0.0' - smackVersion = '4.2.2' + smackVersion = '4.2.3' springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.1.0.BUILD-SNAPSHOT' springDataJpaVersion = '2.1.0.BUILD-SNAPSHOT' springDataMongoVersion = '2.1.0.BUILD-SNAPSHOT' @@ -143,7 +128,7 @@ subprojects { subproject -> springRetryVersion = '1.2.2.RELEASE' springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.1.0.BUILD-SNAPSHOT' springWsVersion = '3.0.1.RELEASE' - tomcatVersion = "8.5.23" + tomcatVersion = "9.0.7" xmlUnitVersion = '1.6' xstreamVersion = '1.4.10' } @@ -169,7 +154,7 @@ subprojects { subproject -> testRuntime "org.junit.platform:junit-platform-launcher:$junitPlatformVersion" // To support JUnit 4 tests - testRuntime "org.junit.vintage:junit-vintage-engine:$junitVintageVersion" + testRuntime "org.junit.vintage:junit-vintage-engine:$junitJupiterVersion" // To avoid compiler warnings about @API annotations in JUnit code testCompileOnly 'org.apiguardian:apiguardian-api:1.0.0' @@ -186,7 +171,7 @@ subprojects { subproject -> doLast { def configFiles = [] sourceSets.test.java.srcDirs.each { - fileTree(it).include('**/*.xml').exclude('**/log4j.xml').each { configFile -> + fileTree(it).include('**/*.xml').exclude('**/log4j2-test.xml').each { configFile -> def configXml = new XmlParser(false, false).parse(configFile) if (configXml.@'xsi:schemaLocation' ==~ /.*spring-[a-z-]*\d\.\d\.xsd.*/) { @@ -232,11 +217,13 @@ subprojects { subproject -> logging.captureStandardOutput(LogLevel.INFO) dependsOn checkTestConfigs - if (name ==~ /(springIo.*)|(testAll)/) { + if (name ==~ /(testAll)/) { systemProperty 'RUN_LONG_INTEGRATION_TESTS', 'true' } environment 'SI_FATAL_WHEN_NO_BEANFACTORY', 'true' + + useJUnitPlatform() } task sourcesJar(type: Jar) { @@ -251,7 +238,7 @@ subprojects { subproject -> checkstyle { configFile = file("$rootDir/src/checkstyle/checkstyle.xml") - toolVersion = "8.0" + toolVersion = "8.9" } artifacts { @@ -298,12 +285,7 @@ project('spring-integration-amqp') { description = 'Spring Integration AMQP Support' dependencies { compile project(":spring-integration-core") - compile("org.springframework.amqp:spring-rabbit:$springAmqpVersion") { - exclude group: 'org.springframework', module: 'spring-aop' - exclude group: 'org.springframework', module: 'spring-context' - exclude group: 'org.springframework', module: 'spring-core' - exclude group: 'org.springframework', module: 'spring-tx' - } + compile("org.springframework.amqp:spring-rabbit:$springAmqpVersion") testCompile("org.springframework.amqp:spring-rabbit-junit:$springAmqpVersion") testCompile project(":spring-integration-stream") @@ -324,10 +306,7 @@ project('spring-integration-core') { } compile "io.projectreactor:reactor-core:$reactorVersion" compile("com.fasterxml.jackson.core:jackson-databind:$jackson2Version", optional) - compile("com.jayway.jsonpath:json-path:$jsonpathVersion") { - optional it - exclude group: 'org.slf4j', module: 'slf4j-api' - } + compile("com.jayway.jsonpath:json-path:$jsonpathVersion", optional) compile("io.fastjson:boon:$boonVersion", optional) compile("com.esotericsoftware:kryo-shaded:$kryoShadedVersion", optional) compile("io.micrometer:micrometer-core:$micrometerVersion", optional) @@ -358,6 +337,7 @@ project('spring-integration-file') { dependencies { compile project(":spring-integration-core") compile "commons-io:commons-io:$commonsIoVersion" + testCompile project(":spring-integration-redis") testCompile project(":spring-integration-redis").sourceSets.test.output testCompile project(":spring-integration-gemfire") @@ -375,6 +355,7 @@ project('spring-integration-ftp') { compile "commons-net:commons-net:$commonsNetVersion" compile "org.springframework:spring-context-support:$springVersion" compile("javax.activation:activation:$javaxActivationVersion", optional) + testCompile "org.apache.ftpserver:ftpserver-core:$ftpServerVersion" testCompile project(":spring-integration-file").sourceSets.test.output } @@ -406,6 +387,7 @@ project('spring-integration-groovy') { compile project(":spring-integration-scripting") compile "org.codehaus.groovy:groovy-all:$groovyVersion" compile "org.springframework:spring-context-support:$springVersion" + testCompile "org.springframework:spring-web:$springVersion" } } @@ -419,22 +401,8 @@ project('spring-integration-http') { compile ("com.rometools:rome:$romeToolsVersion", optional) testCompile project(":spring-integration-security") - testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") { - exclude group: 'org.springframework', module: "spring-aop" - exclude group: 'org.springframework', module: "spring-beans" - exclude group: 'org.springframework', module: "spring-context" - exclude group: 'org.springframework', module: "spring-core" - exclude group: 'org.springframework', module: "spring-expression" - } - testCompile ("org.springframework.security:spring-security-test:$springSecurityVersion") { - exclude group: 'org.springframework', module: "spring-aop" - exclude group: 'org.springframework', module: "spring-beans" - exclude group: 'org.springframework', module: "spring-context" - exclude group: 'org.springframework', module: "spring-core" - exclude group: 'org.springframework', module: "spring-expression" - exclude group: 'org.springframework', module: "spring-test" - exclude group: 'org.springframework', module: "spring-web" - } + testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") + testCompile ("org.springframework.security:spring-security-test:$springSecurityVersion") } } @@ -475,6 +443,7 @@ project('spring-integration-jms') { compile "org.springframework:spring-jms:$springVersion" compile ("javax.jms:javax.jms-api:$jmsApiVersion", provided) testCompile("org.apache.activemq:activemq-broker:$activeMqVersion") + testCompile "org.springframework:spring-oxm:$springVersion" } } @@ -483,6 +452,7 @@ project('spring-integration-jmx') { description = 'Spring Integration JMX Support' dependencies { compile project(":spring-integration-core") + testCompile "org.aspectj:aspectjweaver:$aspectjVersion" testCompile "com.hazelcast:hazelcast:$hazelcastVersion" } @@ -495,15 +465,7 @@ project('spring-integration-jpa') { compile "org.springframework:spring-orm:$springVersion" compile ("org.eclipse.persistence:javax.persistence:$jpaApiVersion", optional) - testCompile ("org.springframework.data:spring-data-jpa:$springDataJpaVersion") { - exclude group: 'org.springframework', module: 'spring-beans' - exclude group: 'org.springframework', module: 'spring-context' - exclude group: 'org.springframework', module: 'spring-core' - exclude group: 'org.springframework', module: 'spring-expression' - exclude group: 'org.springframework', module: 'spring-aop' - exclude group: 'org.springframework', module: 'spring-orm' - exclude group: 'org.springframework', module: 'spring-tx' - } + testCompile ("org.springframework.data:spring-data-jpa:$springDataJpaVersion") testCompile "com.h2database:h2:$h2Version" @@ -514,7 +476,7 @@ project('spring-integration-jpa') { testRuntime "org.springframework:spring-instrument:$springVersion" } - tasks.withType(Test).matching {it.name ==~ /(springIo.+)|(test)|(testAll)/}.all { + tasks.withType(Test).matching {it.name ==~ /(test)|(testAll)/}.all { jvmArgs classpath.files.findAll { it.name ==~ /(spring-instrument.+)/}.collect{"-javaagent:$it" } @@ -541,13 +503,7 @@ project('spring-integration-mongodb') { description = 'Spring Integration MongoDB Support' dependencies { compile project(":spring-integration-core") - compile("org.springframework.data:spring-data-mongodb:$springDataMongoVersion") { - exclude group: 'org.springframework', module: 'spring-beans' - exclude group: 'org.springframework', module: 'spring-context' - exclude group: 'org.springframework', module: 'spring-core' - exclude group: 'org.springframework', module: 'spring-expression' - exclude group: 'org.springframework', module: 'spring-tx' - } + compile("org.springframework.data:spring-data-mongodb:$springDataMongoVersion") } } @@ -563,15 +519,8 @@ project('spring-integration-redis') { description = 'Spring Integration Redis Support' dependencies { compile project(":spring-integration-core") - compile ("org.springframework.data:spring-data-redis:$springDataRedisVersion") { - exclude group: 'org.springframework', module: 'spring-beans' - exclude group: 'org.springframework', module: 'spring-context' - exclude group: 'org.springframework', module: 'spring-context-support' - exclude group: 'org.springframework', module: 'spring-core' - exclude group: 'org.springframework', module: 'spring-tx' - exclude group: 'org.springframework', module: 'spring-aop' - exclude group: 'org.springframework', module: 'spring-oxm' - } + compile ("org.springframework.data:spring-data-redis:$springDataRedisVersion") + testCompile "redis.clients:jedis:$jedisVersion" } } @@ -587,6 +536,7 @@ project('spring-integration-scripting') { description = 'Spring Integration Scripting Support' dependencies { compile project(":spring-integration-core") + testCompile("org.jruby:jruby:$jrubyVersion") testCompile("org.codehaus.groovy:groovy-all:$groovyVersion") testCompile("org.python:jython-standalone:$jythonVersion") @@ -597,21 +547,9 @@ project('spring-integration-security') { description = 'Spring Integration Security Support' dependencies { compile project(":spring-integration-core") - compile("org.springframework.security:spring-security-core:$springSecurityVersion") { - exclude group: 'org.springframework', module: "spring-aop" - exclude group: 'org.springframework', module: "spring-beans" - exclude group: 'org.springframework', module: "spring-context" - exclude group: 'org.springframework', module: "spring-core" - exclude group: 'org.springframework', module: "spring-expression" - } + compile("org.springframework.security:spring-security-core:$springSecurityVersion") - testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") { - exclude group: 'org.springframework', module: "spring-aop" - exclude group: 'org.springframework', module: "spring-beans" - exclude group: 'org.springframework', module: "spring-context" - exclude group: 'org.springframework', module: "spring-core" - exclude group: 'org.springframework', module: "spring-expression" - } + testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") } } @@ -623,6 +561,7 @@ project('spring-integration-sftp') { compile "com.jcraft:jsch:$jschVersion" compile "org.springframework:spring-context-support:$springVersion" compile("javax.activation:activation:$javaxActivationVersion", optional) + testCompile "org.apache.sshd:sshd-core:$apacheSshdVersion" testCompile project(":spring-integration-file").sourceSets.test.output } @@ -696,22 +635,8 @@ project('spring-integration-webflux') { compile ("io.projectreactor.ipc:reactor-netty:$reactorNettyVersion" , optional) testCompile "org.springframework:spring-webmvc:$springVersion" - testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") { - exclude group: 'org.springframework', module: "spring-aop" - exclude group: 'org.springframework', module: "spring-beans" - exclude group: 'org.springframework', module: "spring-context" - exclude group: 'org.springframework', module: "spring-core" - exclude group: 'org.springframework', module: "spring-expression" - } - testCompile ("org.springframework.security:spring-security-test:$springSecurityVersion") { - exclude group: 'org.springframework', module: "spring-aop" - exclude group: 'org.springframework', module: "spring-beans" - exclude group: 'org.springframework', module: "spring-context" - exclude group: 'org.springframework', module: "spring-core" - exclude group: 'org.springframework', module: "spring-expression" - exclude group: 'org.springframework', module: "spring-test" - exclude group: 'org.springframework', module: "spring-web" - } + testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") + testCompile ("org.springframework.security:spring-security-test:$springSecurityVersion") testCompile "io.projectreactor:reactor-test:$reactorVersion" } } @@ -735,28 +660,17 @@ project('spring-integration-ws') { compile project(":spring-integration-core") compile "org.springframework:spring-oxm:$springVersion" compile "org.springframework:spring-webmvc:$springVersion" - compile ("org.springframework.ws:spring-ws-core:$springWsVersion") { - exclude group: 'org.springframework', module: 'spring-aop' - exclude group: 'org.springframework', module: 'spring-beans' - exclude group: 'org.springframework', module: 'spring-context' - exclude group: 'org.springframework', module: 'spring-core' - exclude group: 'org.springframework', module: 'spring-oxm' - exclude group: 'org.springframework', module: 'spring-web' - exclude group: 'org.springframework', module: 'spring-webmvc' - } + compile ("org.springframework.ws:spring-ws-core:$springWsVersion") testCompile "com.thoughtworks.xstream:xstream:$xstreamVersion" - testCompile ("org.springframework.ws:spring-ws-support:$springWsVersion") { - exclude group: 'org.springframework' - } - testCompile ("org.springframework:spring-jms:$springVersion") { - exclude group: 'org.springframework' - } + testCompile ("org.springframework.ws:spring-ws-support:$springWsVersion") + testCompile ("org.springframework:spring-jms:$springVersion") testCompile "javax.jms:javax.jms-api:$jmsApiVersion" testCompile "org.igniterealtime.smack:smack-tcp:$smackVersion" testCompile "org.igniterealtime.smack:smack-java7:$smackVersion" testCompile "org.igniterealtime.smack:smack-extensions:$smackVersion" testCompile "javax.mail:javax.mail-api:$javaxMailVersion" + testRuntime "com.sun.mail:mailapi:$javaxMailVersion" testRuntime "com.sun.mail:javax.mail:$javaxMailVersion" } @@ -767,21 +681,9 @@ project('spring-integration-xml') { dependencies { compile project(":spring-integration-core") compile "org.springframework:spring-oxm:$springVersion" - compile ("org.springframework.ws:spring-xml:$springWsVersion") { - exclude group: 'org.springframework', module: 'spring-beans' - exclude group: 'org.springframework', module: 'spring-context' - exclude group: 'org.springframework', module: 'spring-core' - } - compile ("org.springframework.ws:spring-ws-core:$springWsVersion") { - optional it - exclude group: 'org.springframework', module: 'spring-aop' - exclude group: 'org.springframework', module: 'spring-beans' - exclude group: 'org.springframework', module: 'spring-context' - exclude group: 'org.springframework', module: 'spring-core' - exclude group: 'org.springframework', module: 'spring-oxm' - exclude group: 'org.springframework', module: 'spring-web' - exclude group: 'org.springframework', module: 'spring-webmvc' - } + compile ("org.springframework.ws:spring-xml:$springWsVersion") + compile ("org.springframework.ws:spring-ws-core:$springWsVersion") + testCompile "xmlunit:xmlunit:$xmlUnitVersion" } } @@ -804,10 +706,7 @@ project('spring-integration-zookeeper') { dependencies { compile project(":spring-integration-core") - compile("org.apache.curator:curator-recipes:$curatorVersion") { - exclude group: 'io.netty', module: 'netty' - exclude group: 'log4j', module: 'log4j' - } + compile("org.apache.curator:curator-recipes:$curatorVersion") testCompile "org.apache.curator:curator-test:$curatorVersion" } @@ -848,12 +747,13 @@ project("spring-integration-bom") { } } -apply plugin: org.asciidoctor.gradle.AsciidoctorPlugin +apply plugin: 'org.asciidoctor.convert' asciidoctor { - sourceDir file("$docsDir") - sourceDocumentNames = files("$docsDir/index.adoc") // Change in >= 1.5.1 - outputDir file("$buildDir/html") + sourceDir = file("$docsDir") + sources { + include 'index.adoc' + } backends = ['html5', 'docbook'] logDocuments = true options = [ @@ -875,7 +775,7 @@ apply plugin: DocbookReferencePlugin reference { sourceFileName = 'index.xml' - sourceDir = file("$buildDir/html") + sourceDir = file("$buildDir/asciidoc/docbook") pdfFilename = 'spring-integration-reference.pdf' expandPlaceholders = '' } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f6b961fd5a..91ca28c8b8 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 bf3de21830..16d28051c9 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.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/spring-integration-jdbc/src/test/java/int-derby.properties b/spring-integration-jdbc/src/test/resources/int-derby.properties similarity index 100% rename from spring-integration-jdbc/src/test/java/int-derby.properties rename to spring-integration-jdbc/src/test/resources/int-derby.properties diff --git a/spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/MqttAdapterTests.java b/spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/MqttAdapterTests.java index 3a66b4a089..6318d742dc 100644 --- a/spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/MqttAdapterTests.java +++ b/spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/MqttAdapterTests.java @@ -119,7 +119,7 @@ public class MqttAdapterTests { factory.setConnectionTimeout(23); factory.setKeepAliveInterval(45); factory.setPassword("pass"); - SocketFactory socketFactory = mock(SocketFactory.class); + SocketFactory socketFactory = SocketFactory.getDefault(); factory.setSocketFactory(socketFactory); Properties props = new Properties(); factory.setSslProperties(props); @@ -150,7 +150,7 @@ public class MqttAdapterTests { factory.setPassword("pass"); MemoryPersistence persistence = new MemoryPersistence(); factory.setPersistence(persistence); - final SocketFactory socketFactory = mock(SocketFactory.class); + final SocketFactory socketFactory = SocketFactory.getDefault(); factory.setSocketFactory(socketFactory); final Properties props = new Properties(); factory.setSslProperties(props); @@ -211,7 +211,7 @@ public class MqttAdapterTests { factory.setPassword("pass"); MemoryPersistence persistence = new MemoryPersistence(); factory.setPersistence(persistence); - final SocketFactory socketFactory = mock(SocketFactory.class); + final SocketFactory socketFactory = SocketFactory.getDefault(); factory.setSocketFactory(socketFactory); final Properties props = new Properties(); factory.setSslProperties(props); @@ -427,7 +427,7 @@ public class MqttAdapterTests { factory.setPassword("pass"); MemoryPersistence persistence = new MemoryPersistence(); factory.setPersistence(persistence); - final SocketFactory socketFactory = mock(SocketFactory.class); + final SocketFactory socketFactory = SocketFactory.getDefault(); factory.setSocketFactory(socketFactory); final Properties props = new Properties(); factory.setSslProperties(props); @@ -477,7 +477,7 @@ public class MqttAdapterTests { factory.setPassword("pass"); MemoryPersistence persistence = new MemoryPersistence(); factory.setPersistence(persistence); - final SocketFactory socketFactory = mock(SocketFactory.class); + final SocketFactory socketFactory = SocketFactory.getDefault(); factory.setSocketFactory(socketFactory); final Properties props = new Properties(); factory.setSslProperties(props);