* It looks like we don't need to manage Reactor dependencies in the RSocket module: the `io.rsocket:rsocket-transport-netty` brings everything we need, although it doesn't that with its own supported versions * Use non-HTTPS url for `example.org` in test config to avoid SSL handshake
1109 lines
33 KiB
Groovy
1109 lines
33 KiB
Groovy
buildscript {
|
|
ext.kotlinVersion = '1.3.31'
|
|
repositories {
|
|
maven { url 'https://repo.spring.io/plugins-release' }
|
|
}
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
|
|
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.18'
|
|
classpath 'io.spring.nohttp:nohttp-gradle:0.0.3.RELEASE'
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'org.sonarqube' version '2.7.1'
|
|
id 'org.asciidoctor.convert' version '1.6.1'
|
|
id 'org.ajoberstar.grgit' version '3.1.1'
|
|
}
|
|
|
|
if (System.getenv('TRAVIS') || System.getenv('bamboo_buildKey')) {
|
|
apply plugin: 'io.spring.nohttp'
|
|
|
|
nohttp {
|
|
whitelistFile = file('src/nohttp/whitelist.lines')
|
|
source.include '**/src/**'
|
|
source.exclude '**/*.gif', '**/*.jpg', '**/*.png', '**/*.svg', '**/*.ks'
|
|
}
|
|
}
|
|
|
|
description = 'Spring Integration'
|
|
|
|
ext {
|
|
linkHomepage = 'https://projects.spring.io/spring-integration'
|
|
linkCi = 'https://build.spring.io/browse/INT'
|
|
linkIssue = 'https://jira.spring.io/browse/INT'
|
|
linkScmUrl = 'https://github.com/spring-projects/spring-integration'
|
|
linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-integration.git'
|
|
linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-integration.git'
|
|
docResourcesVersion = '0.1.0.RELEASE'
|
|
|
|
modifiedFiles =
|
|
files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') || f.name.endsWith('.kt') }
|
|
}
|
|
|
|
allprojects {
|
|
group = 'org.springframework.integration'
|
|
|
|
repositories {
|
|
maven { url 'https://repo.spring.io/libs-milestone' }
|
|
if (version.endsWith('BUILD-SNAPSHOT')) {
|
|
maven { url 'https://repo.spring.io/libs-snapshot' }
|
|
}
|
|
maven { url "https://oss.jfrog.org/artifactory/libs-snapshot" } // RSocket
|
|
// maven { url 'https://repo.spring.io/libs-staging-local' }
|
|
}
|
|
|
|
ext.javadocLinks = [
|
|
'https://docs.oracle.com/javase/7/docs/api/',
|
|
'https://docs.oracle.com/javaee/6/api/',
|
|
'https://docs.spring.io/spring/docs/current/javadoc-api/',
|
|
'https://docs.spring.io/spring-amqp/docs/current/api/',
|
|
'https://docs.spring.io/spring-data-gemfire/docs/current/api/',
|
|
'https://docs.spring.io/spring-data/data-mongo/docs/current/api/',
|
|
'https://docs.spring.io/spring-data/data-redis/docs/current/api/',
|
|
'https://docs.spring.io/spring-ws/sites/2.0/apidocs/'
|
|
] as String[]
|
|
|
|
}
|
|
|
|
subprojects { subproject ->
|
|
|
|
apply plugin: 'java'
|
|
apply from: "${rootProject.projectDir}/publish-maven.gradle"
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'idea'
|
|
apply plugin: 'jacoco'
|
|
apply plugin: 'checkstyle'
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'kotlin-spring'
|
|
|
|
sourceSets {
|
|
test {
|
|
resources {
|
|
srcDirs = ['src/test/resources', 'src/test/java']
|
|
}
|
|
}
|
|
}
|
|
|
|
compileJava {
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
}
|
|
|
|
compileTestKotlin {
|
|
kotlinOptions {
|
|
freeCompilerArgs = ['-Xjsr305=strict']
|
|
jvmTarget = '1.8'
|
|
}
|
|
}
|
|
|
|
ext {
|
|
activeMqVersion = '5.15.9'
|
|
apacheSshdVersion = '2.2.0'
|
|
aspectjVersion = '1.9.4'
|
|
assertjVersion = '3.12.2'
|
|
assertkVersion = '0.17'
|
|
awaitilityVersion = '3.1.6'
|
|
boonVersion = '0.34'
|
|
commonsDbcp2Version = '2.6.0'
|
|
commonsIoVersion = '2.6'
|
|
commonsNetVersion = '3.6'
|
|
curatorVersion = '4.2.0'
|
|
derbyVersion = '10.14.2.0'
|
|
ftpServerVersion = '1.1.1'
|
|
googleJsr305Version = '3.0.2'
|
|
groovyVersion = '2.5.7'
|
|
hamcrestVersion = '2.1'
|
|
hazelcastVersion = '3.12'
|
|
hibernateVersion = '5.4.2.Final'
|
|
hsqldbVersion = '2.4.1'
|
|
h2Version = '1.4.199'
|
|
jackson2Version = '2.9.9'
|
|
javaxActivationVersion = '1.2.0'
|
|
javaxMailVersion = '1.6.2'
|
|
jmsApiVersion = '2.0.1'
|
|
jpa21ApiVersion = '1.0.2.Final'
|
|
jpaApiVersion = '2.2.1'
|
|
jrubyVersion = '9.2.7.0'
|
|
jschVersion = '0.1.55'
|
|
jsonpathVersion = '2.4.0'
|
|
junit4Version = '4.12'
|
|
junitJupiterVersion = '5.4.1'
|
|
junitPlatformVersion = '1.4.1'
|
|
jythonVersion = '2.7.0'
|
|
kryoShadedVersion = '4.0.2'
|
|
lettuceVersion = '5.1.7.RELEASE'
|
|
log4jVersion = '2.11.2'
|
|
micrometerVersion = '1.1.5'
|
|
mockitoVersion = '2.26.0'
|
|
mysqlVersion = '8.0.16'
|
|
pahoMqttClientVersion = '1.2.0'
|
|
postgresVersion = '42.2.5'
|
|
reactorNettyVersion = '0.9.0.BUILD-SNAPSHOT'
|
|
reactorVersion = '3.3.0.BUILD-SNAPSHOT'
|
|
resilience4jVersion = '0.14.1'
|
|
romeToolsVersion = '1.12.0'
|
|
rsocketVersion = '1.0.0-RC1-SNAPSHOT'
|
|
servletApiVersion = '4.0.1'
|
|
smackVersion = '4.3.3'
|
|
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.2.0.BUILD-SNAPSHOT'
|
|
springDataJpaVersion = '2.2.0.BUILD-SNAPSHOT'
|
|
springDataMongoVersion = '2.2.0.BUILD-SNAPSHOT'
|
|
springDataRedisVersion = '2.2.0.BUILD-SNAPSHOT'
|
|
springGemfireVersion = '2.2.0.BUILD-SNAPSHOT'
|
|
springSecurityVersion = '5.2.0.BUILD-SNAPSHOT'
|
|
springRetryVersion = '1.2.4.RELEASE'
|
|
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.2.0.BUILD-SNAPSHOT'
|
|
springWsVersion = '3.0.7.RELEASE'
|
|
tomcatVersion = "9.0.19"
|
|
xstreamVersion = '1.4.11.1'
|
|
}
|
|
|
|
eclipse {
|
|
project {
|
|
natures += 'org.springframework.ide.eclipse.core.springnature'
|
|
}
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion = "0.8.3"
|
|
}
|
|
|
|
// dependencies that are common across all java projects
|
|
dependencies {
|
|
if (!(subproject.name ==~ /.*-test.*/)) {
|
|
testCompile (project(":spring-integration-test-support")) {
|
|
exclude group: 'org.hamcrest'
|
|
}
|
|
}
|
|
|
|
// JSR-305 only used for non-required meta-annotations
|
|
compileOnly "com.google.code.findbugs:jsr305:$googleJsr305Version"
|
|
testCompile "com.google.code.findbugs:jsr305:$googleJsr305Version"
|
|
|
|
testCompile ("org.awaitility:awaitility:$awaitilityVersion") {
|
|
exclude group: 'org.hamcrest'
|
|
}
|
|
|
|
testCompile "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
|
|
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
|
|
testRuntime "org.junit.platform:junit-platform-launcher:$junitPlatformVersion"
|
|
|
|
// To support JUnit 4 tests
|
|
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'
|
|
|
|
testRuntime "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
|
|
testRuntime "org.apache.logging.log4j:log4j-jcl:$log4jVersion"
|
|
|
|
testCompile "com.willowtreeapps.assertk:assertk-jvm:$assertkVersion"
|
|
|
|
testCompile "org.jetbrains.kotlin:kotlin-reflect"
|
|
testCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
|
|
|
}
|
|
|
|
// enable all compiler warnings; individual projects may customize further
|
|
ext.xLintArg = '-Xlint:all,-options,-processing'
|
|
[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg]
|
|
|
|
task checkTestConfigs {
|
|
inputs.files(
|
|
sourceSets.test.java.srcDirs.collect {
|
|
fileTree(it)
|
|
.include('**/*.xml')
|
|
.exclude('**/log4j2-test.xml')
|
|
})
|
|
outputs.dir('build/resources')
|
|
doLast {
|
|
def wrongConfigs = inputs.files.filter {
|
|
new XmlParser(false, false)
|
|
.parse(it)
|
|
.@'xsi:schemaLocation' ==~ /.*spring-[a-z-]*\d\.\d\.xsd.*/
|
|
}
|
|
if (!wrongConfigs.empty) {
|
|
throw new InvalidUserDataException('Hardcoded XSD version in the config files:\n' +
|
|
wrongConfigs.collect { relativePath(it) }.join('\n') +
|
|
'\nPlease, use versionless schemaLocations for Spring XSDs to avoid issues with builds ' +
|
|
'on different versions of dependencies.')
|
|
}
|
|
}
|
|
}
|
|
|
|
task updateCopyrights {
|
|
onlyIf { !System.getenv('TRAVIS') && !System.getenv('bamboo_buildKey') }
|
|
inputs.files(modifiedFiles.filter { f -> f.path.contains(subproject.name) })
|
|
outputs.dir('build/classes')
|
|
|
|
doLast {
|
|
def now = Calendar.instance.get(Calendar.YEAR) as String
|
|
inputs.files.each { file ->
|
|
def line
|
|
file.withReader { reader ->
|
|
while (line = reader.readLine()) {
|
|
def matcher = line =~ /Copyright (20\d\d)-?(20\d\d)?/
|
|
if (matcher.count) {
|
|
def beginningYear = matcher[0][1]
|
|
if (now != beginningYear && now != matcher[0][2]) {
|
|
def years = "$beginningYear-$now"
|
|
def sourceCode = file.text
|
|
sourceCode = sourceCode.replaceFirst(/20\d\d(-20\d\d)?/, years)
|
|
file.text = sourceCode
|
|
println "Copyright updated for file: $file"
|
|
}
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
compileKotlin.dependsOn updateCopyrights
|
|
|
|
jacocoTestReport {
|
|
reports {
|
|
xml.enabled false
|
|
csv.enabled false
|
|
html.destination file("${buildDir}/reports/jacoco/html")
|
|
}
|
|
}
|
|
|
|
test {
|
|
maxHeapSize = "1536m"
|
|
jacoco {
|
|
append = false
|
|
destinationFile = file("$buildDir/jacoco.exec")
|
|
}
|
|
}
|
|
|
|
task testAll(type: Test, dependsOn: [":checkAsciidocLinks",'check'])
|
|
|
|
gradle.taskGraph.whenReady { graph ->
|
|
if (graph.hasTask(testAll)) {
|
|
test.enabled = false
|
|
}
|
|
}
|
|
|
|
tasks.withType(Test).all {
|
|
// suppress all console output during testing unless running `gradle -i`
|
|
logging.captureStandardOutput(LogLevel.INFO)
|
|
dependsOn checkTestConfigs
|
|
|
|
if (name ==~ /(testAll)/) {
|
|
systemProperty 'RUN_LONG_INTEGRATION_TESTS', 'true'
|
|
}
|
|
|
|
environment 'SI_FATAL_WHEN_NO_BEANFACTORY', 'true'
|
|
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allJava
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
classifier = 'javadoc'
|
|
from javadoc
|
|
}
|
|
|
|
checkstyle {
|
|
configFile = file("$rootDir/src/checkstyle/checkstyle.xml")
|
|
toolVersion = "8.21"
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes(
|
|
'Implementation-Version': version,
|
|
'Created-By': "JDK ${System.properties['java.version']} (${System.properties['java.specification.vendor']})",
|
|
'Implementation-Title': subproject.name,
|
|
'Implementation-Vendor-Id': subproject.group,
|
|
'Implementation-Vendor': 'Pivotal Software, Inc.',
|
|
'Implementation-URL': linkHomepage,
|
|
'Automatic-Module-Name': subproject.name.replace('-', '.') // for Jigsaw
|
|
)
|
|
}
|
|
|
|
from("${rootProject.projectDir}/src/dist") {
|
|
include "license.txt"
|
|
include "notice.txt"
|
|
into "META-INF"
|
|
expand(copyright: new Date().format("yyyy"), version: project.version)
|
|
}
|
|
}
|
|
|
|
check.dependsOn javadoc
|
|
build.dependsOn jacocoTestReport
|
|
}
|
|
|
|
project('spring-integration-test-support') {
|
|
description = 'Spring Integration Test Support - **No SI Dependencies Allowed**'
|
|
dependencies {
|
|
compile "org.hamcrest:hamcrest-library:$hamcrestVersion"
|
|
compile ("junit:junit:$junit4Version") {
|
|
exclude group: 'org.hamcrest'
|
|
}
|
|
compile ("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion", optional)
|
|
compileOnly 'org.apiguardian:apiguardian-api:1.0.0'
|
|
compile "org.mockito:mockito-core:$mockitoVersion"
|
|
compile "org.assertj:assertj-core:$assertjVersion"
|
|
compile "org.springframework:spring-context:$springVersion"
|
|
compile "org.springframework:spring-messaging:$springVersion"
|
|
compile "org.springframework:spring-test:$springVersion"
|
|
compile ("org.apache.logging.log4j:log4j-core:$log4jVersion" , optional)
|
|
}
|
|
}
|
|
|
|
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'
|
|
}
|
|
|
|
testCompile("org.springframework.amqp:spring-rabbit-junit:$springAmqpVersion")
|
|
testCompile project(":spring-integration-stream")
|
|
}
|
|
}
|
|
|
|
project('spring-integration-core') {
|
|
description = 'Spring Integration Core'
|
|
|
|
dependencies {
|
|
compile "org.springframework:spring-core:$springVersion"
|
|
compile "org.springframework:spring-aop:$springVersion"
|
|
compile "org.springframework:spring-context:$springVersion"
|
|
compile "org.springframework:spring-messaging:$springVersion"
|
|
compile "org.springframework:spring-tx:$springVersion"
|
|
compile ("org.springframework.retry:spring-retry:$springRetryVersion") {
|
|
exclude group: 'org.springframework', module: 'spring-core'
|
|
}
|
|
compile "io.projectreactor:reactor-core:$reactorVersion"
|
|
compile("com.fasterxml.jackson.core:jackson-databind:$jackson2Version", optional)
|
|
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)
|
|
compile("io.github.resilience4j:resilience4j-ratelimiter:$resilience4jVersion", optional)
|
|
|
|
testCompile ("org.aspectj:aspectjweaver:$aspectjVersion")
|
|
testCompile "io.projectreactor:reactor-test:$reactorVersion"
|
|
testCompile ("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson2Version")
|
|
}
|
|
}
|
|
|
|
project('spring-integration-event') {
|
|
description = 'Spring Integration ApplicationEvent Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
}
|
|
}
|
|
|
|
project('spring-integration-feed') {
|
|
description = 'Spring Integration RSS Feed Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile "com.rometools:rome:$romeToolsVersion"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-file') {
|
|
description = 'Spring Integration File Support'
|
|
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")
|
|
testCompile project(":spring-integration-jdbc")
|
|
testCompile "com.h2database:h2:$h2Version"
|
|
testCompile "io.lettuce:lettuce-core:$lettuceVersion"
|
|
testCompile "io.projectreactor:reactor-test:$reactorVersion"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-ftp') {
|
|
description = 'Spring Integration FTP Support'
|
|
dependencies {
|
|
compile project(":spring-integration-file")
|
|
compile "commons-net:commons-net:$commonsNetVersion"
|
|
compile "org.springframework:spring-context-support:$springVersion"
|
|
compile("javax.activation:javax.activation-api:$javaxActivationVersion", optional)
|
|
|
|
testCompile "org.apache.ftpserver:ftpserver-core:$ftpServerVersion"
|
|
testCompile project(":spring-integration-file").sourceSets.test.output
|
|
}
|
|
}
|
|
|
|
project('spring-integration-gemfire') {
|
|
description = 'Spring Integration GemFire Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile ("org.springframework.data:spring-data-geode:$springGemfireVersion")
|
|
compile "commons-io:commons-io:$commonsIoVersion"
|
|
|
|
testCompile project(":spring-integration-stream")
|
|
|
|
}
|
|
}
|
|
|
|
project('spring-integration-groovy') {
|
|
description = 'Spring Integration Groovy Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile project(":spring-integration-scripting")
|
|
compile "org.codehaus.groovy:groovy:$groovyVersion"
|
|
compile "org.springframework:spring-context-support:$springVersion"
|
|
|
|
testCompile "org.springframework:spring-web:$springVersion"
|
|
|
|
testRuntime "org.codehaus.groovy:groovy-dateutil:$groovyVersion"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-http') {
|
|
description = 'Spring Integration HTTP Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile "org.springframework:spring-webmvc:$springVersion"
|
|
compile ("javax.servlet:javax.servlet-api:$servletApiVersion", provided)
|
|
compile ("com.rometools:rome:$romeToolsVersion", optional)
|
|
|
|
testCompile project(":spring-integration-security")
|
|
testCompile "org.hamcrest:hamcrest-core:$hamcrestVersion"
|
|
testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") {
|
|
exclude group: 'org.springframework'
|
|
}
|
|
testCompile ("org.springframework.security:spring-security-test:$springSecurityVersion") {
|
|
exclude group: 'org.springframework'
|
|
}
|
|
}
|
|
}
|
|
|
|
project('spring-integration-ip') {
|
|
description = 'Spring Integration IP Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
testCompile project(":spring-integration-stream")
|
|
testCompile project(":spring-integration-event")
|
|
}
|
|
}
|
|
|
|
project('spring-integration-jdbc') {
|
|
description = 'Spring Integration JDBC Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile "org.springframework:spring-jdbc:$springVersion"
|
|
|
|
testCompile "com.h2database:h2:$h2Version"
|
|
testCompile "org.hsqldb:hsqldb:$hsqldbVersion"
|
|
testCompile "org.apache.derby:derby:$derbyVersion"
|
|
testCompile "org.apache.derby:derbyclient:$derbyVersion"
|
|
testCompile "org.postgresql:postgresql:$postgresVersion"
|
|
testCompile "mysql:mysql-connector-java:$mysqlVersion"
|
|
testCompile "org.apache.commons:commons-dbcp2:$commonsDbcp2Version"
|
|
|
|
}
|
|
|
|
// suppress derby localization jar path warnings during test compilation
|
|
compileTestJava.options.compilerArgs = ["${xLintArg},-path"]
|
|
}
|
|
|
|
project('spring-integration-jms') {
|
|
description = 'Spring Integration JMS Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
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"
|
|
}
|
|
}
|
|
|
|
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"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-jpa') {
|
|
description = 'Spring Integration JPA Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile "org.springframework:spring-orm:$springVersion"
|
|
compile ("org.eclipse.persistence:javax.persistence:$jpaApiVersion", optional)
|
|
|
|
testCompile ("org.springframework.data:spring-data-jpa:$springDataJpaVersion")
|
|
|
|
testCompile "com.h2database:h2:$h2Version"
|
|
|
|
testCompile "org.hibernate:hibernate-entitymanager:$hibernateVersion"
|
|
|
|
testRuntime "org.hibernate.javax.persistence:hibernate-jpa-2.1-api:$jpa21ApiVersion"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-mail') {
|
|
description = 'Spring Integration Mail Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile "org.springframework:spring-context-support:$springVersion"
|
|
compile("javax.mail:javax.mail-api:$javaxMailVersion", provided)
|
|
compile("com.sun.mail:imap:$javaxMailVersion", provided)
|
|
compile("com.sun.mail:javax.mail:$javaxMailVersion", provided);
|
|
compile("javax.activation:javax.activation-api:$javaxActivationVersion", optional)
|
|
}
|
|
|
|
// suppress javax.activation path warnings
|
|
[compileJava,compileTestJava]*.options*.compilerArgs = ["${xLintArg},-path"]
|
|
}
|
|
|
|
project('spring-integration-mongodb') {
|
|
description = 'Spring Integration MongoDB Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile("org.springframework.data:spring-data-mongodb:$springDataMongoVersion")
|
|
}
|
|
}
|
|
|
|
project('spring-integration-mqtt') {
|
|
description = 'Spring Integration MQTT Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile "org.eclipse.paho:org.eclipse.paho.client.mqttv3:$pahoMqttClientVersion"
|
|
|
|
testCompile project(":spring-integration-jmx")
|
|
}
|
|
}
|
|
|
|
project('spring-integration-redis') {
|
|
description = 'Spring Integration Redis Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile ("org.springframework.data:spring-data-redis:$springDataRedisVersion")
|
|
|
|
testCompile "io.lettuce:lettuce-core:$lettuceVersion"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-rmi') {
|
|
description = 'Spring Integration RMI Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
}
|
|
}
|
|
|
|
project('spring-integration-rsocket') {
|
|
description = 'Spring Integration RSocket Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile("io.rsocket:rsocket-transport-netty:$rsocketVersion")
|
|
|
|
testCompile "io.projectreactor:reactor-test:$reactorVersion"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-scripting') {
|
|
description = 'Spring Integration Scripting Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile ('org.jetbrains.kotlin:kotlin-script-util', optional)
|
|
compile ('org.jetbrains.kotlin:kotlin-compiler-embeddable', optional)
|
|
|
|
testCompile("org.jruby:jruby-complete:$jrubyVersion")
|
|
testCompile("org.codehaus.groovy:groovy:$groovyVersion")
|
|
testCompile("org.codehaus.groovy:groovy-jsr223:$groovyVersion")
|
|
testCompile("org.python:jython-standalone:$jythonVersion")
|
|
testRuntime 'org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable'
|
|
}
|
|
}
|
|
|
|
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'
|
|
}
|
|
|
|
testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") {
|
|
exclude group: 'org.springframework'
|
|
}
|
|
}
|
|
}
|
|
|
|
project('spring-integration-sftp') {
|
|
description = 'Spring Integration SFTP Support'
|
|
dependencies {
|
|
compile project(":spring-integration-file")
|
|
compile project(":spring-integration-stream")
|
|
compile "com.jcraft:jsch:$jschVersion"
|
|
compile "org.springframework:spring-context-support:$springVersion"
|
|
compile("javax.activation:javax.activation-api:$javaxActivationVersion", optional)
|
|
|
|
testCompile "org.apache.sshd:sshd-core:$apacheSshdVersion"
|
|
testCompile "org.apache.sshd:sshd-sftp:$apacheSshdVersion"
|
|
testCompile project(":spring-integration-file").sourceSets.test.output
|
|
}
|
|
}
|
|
|
|
project('spring-integration-stomp') {
|
|
description = 'Spring Integration STOMP Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
|
|
compile ("org.springframework:spring-websocket:$springVersion", optional)
|
|
compile ("io.projectreactor.netty:reactor-netty:$reactorNettyVersion" , optional)
|
|
|
|
testCompile project(":spring-integration-websocket")
|
|
testCompile project(":spring-integration-websocket").sourceSets.test.output
|
|
testCompile project(":spring-integration-event")
|
|
testCompile "org.apache.activemq:activemq-stomp:$activeMqVersion"
|
|
testCompile "org.apache.tomcat.embed:tomcat-embed-websocket:$tomcatVersion"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-stream') {
|
|
description = 'Spring Integration Stream Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
}
|
|
}
|
|
|
|
project('spring-integration-syslog') {
|
|
description = 'Spring Integration Syslog Support'
|
|
dependencies {
|
|
compile project(":spring-integration-ip")
|
|
}
|
|
}
|
|
|
|
project('spring-integration-test') {
|
|
description = 'Spring Integration Testing Framework'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile project(":spring-integration-test-support")
|
|
}
|
|
}
|
|
|
|
project('spring-integration-webflux') {
|
|
description = 'Spring Integration HTTP Support'
|
|
dependencies {
|
|
compile (project(":spring-integration-http")) {
|
|
exclude group: 'org.springframework', module: 'spring-webmvc'
|
|
}
|
|
compile "org.springframework:spring-webflux:$springVersion"
|
|
compile ("io.projectreactor.netty:reactor-netty:$reactorNettyVersion" , optional)
|
|
|
|
testCompile "org.hamcrest:hamcrest-core:$hamcrestVersion"
|
|
testCompile "org.springframework:spring-webmvc:$springVersion"
|
|
testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") {
|
|
exclude group: 'org.springframework'
|
|
}
|
|
testCompile ("org.springframework.security:spring-security-test:$springSecurityVersion") {
|
|
exclude group: 'org.springframework'
|
|
}
|
|
testCompile "io.projectreactor:reactor-test:$reactorVersion"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-websocket') {
|
|
description = 'Spring Integration WebSockets Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile "org.springframework:spring-websocket:$springVersion"
|
|
|
|
compile ("org.springframework:spring-webmvc:$springVersion", optional)
|
|
|
|
testCompile project(":spring-integration-event")
|
|
testCompile "org.apache.tomcat.embed:tomcat-embed-websocket:$tomcatVersion"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-ws') {
|
|
description = 'Spring Integration Web Services Support'
|
|
dependencies {
|
|
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")
|
|
|
|
testCompile "com.thoughtworks.xstream:xstream:$xstreamVersion"
|
|
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"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-xml') {
|
|
description = 'Spring Integration XML Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile "org.springframework:spring-oxm:$springVersion"
|
|
compile ("org.springframework.ws:spring-xml:$springWsVersion")
|
|
compile ("org.springframework.ws:spring-ws-core:$springWsVersion", optional)
|
|
}
|
|
}
|
|
|
|
project('spring-integration-xmpp') {
|
|
description = 'Spring Integration XMPP Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
compile "org.igniterealtime.smack:smack-tcp:$smackVersion"
|
|
compile "org.igniterealtime.smack:smack-java7:$smackVersion"
|
|
compile "org.igniterealtime.smack:smack-extensions:$smackVersion"
|
|
|
|
testCompile project(":spring-integration-stream")
|
|
testCompile "org.igniterealtime.smack:smack-experimental:$smackVersion"
|
|
}
|
|
}
|
|
|
|
project('spring-integration-zookeeper') {
|
|
description = 'Spring Integration Zookeeper Support'
|
|
dependencies {
|
|
compile project(":spring-integration-core")
|
|
|
|
compile("org.apache.curator:curator-recipes:$curatorVersion")
|
|
|
|
testCompile "org.apache.curator:curator-test:$curatorVersion"
|
|
}
|
|
}
|
|
|
|
project("spring-integration-bom") {
|
|
description = "Spring Integration (Bill of Materials)"
|
|
|
|
configurations.archives.artifacts.clear()
|
|
artifacts {
|
|
// work around GRADLE-2406 by attaching text artifact
|
|
archives(file("spring-integration-bom.txt"))
|
|
}
|
|
|
|
install {
|
|
repositories.mavenInstaller {
|
|
pom.whenConfigured {
|
|
packaging = "pom"
|
|
withXml {
|
|
asNode().children().last() + {
|
|
delegate.dependencyManagement {
|
|
delegate.dependencies {
|
|
parent.subprojects.sort { "$it.name" }.each { p ->
|
|
if (p != project) {
|
|
delegate.dependency {
|
|
delegate.groupId(p.group)
|
|
delegate.artifactId(p.name)
|
|
delegate.version(p.version)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
apply plugin: "org.asciidoctor.convert"
|
|
|
|
asciidoctorj {
|
|
version = '1.5.5'
|
|
}
|
|
|
|
configurations {
|
|
docs
|
|
}
|
|
|
|
dependencies {
|
|
docs "io.spring.docresources:spring-doc-resources:${docResourcesVersion}@zip"
|
|
}
|
|
|
|
task prepareAsciidocBuild(type: Sync) {
|
|
dependsOn configurations.docs
|
|
from {
|
|
configurations.docs.collect { zipTree(it) }
|
|
}
|
|
from 'src/reference/asciidoc/'
|
|
into "$buildDir/asciidoc"
|
|
}
|
|
|
|
task checkAsciidocLinks {
|
|
dependsOn prepareAsciidocBuild
|
|
inputs.dir("$buildDir/asciidoc")
|
|
doLast {
|
|
def errors = new ArrayList<>();
|
|
errors.add("*** Anchor reference errors found:")
|
|
inputs.files.filter{ f -> f.path.endsWith('.adoc') }.each { file ->
|
|
def doc = file.text
|
|
def anchors = new HashSet<>()
|
|
def matcher = (doc =~ /\[\[([^]]+)\]\]/)
|
|
while (matcher.find()) {
|
|
anchors.add(matcher.group(1))
|
|
}
|
|
matcher = (doc =~ /<<([^>]+)>>/)
|
|
while (matcher.find()) {
|
|
def anchor = matcher.group(1);
|
|
def hasComma = anchor.contains(",")
|
|
if (!anchor.startsWith("./")) {
|
|
if (hasComma) {
|
|
anchor = anchor.substring(0, anchor.indexOf(","));
|
|
}
|
|
if (!anchors.contains(anchor)) {
|
|
errors.add("\nAnchor '" + anchor
|
|
+ "' not found in '" + file.name
|
|
+ "', if in another file, it needs to be qualified with './fileName.adoc#'")
|
|
}
|
|
}
|
|
else {
|
|
if (!hasComma) {
|
|
errors.add("\nExternal anchor '" + anchor
|
|
+ "' in '" + file.name
|
|
+ "' should have a textual description (,...)")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (errors.size() > 1) {
|
|
throw new InvalidUserDataException(errors.toString())
|
|
}
|
|
}
|
|
}
|
|
|
|
task('makePDF', type: org.asciidoctor.gradle.AsciidoctorTask) {
|
|
dependsOn checkAsciidocLinks
|
|
backends 'pdf'
|
|
sourceDir "$buildDir/asciidoc"
|
|
sources {
|
|
include 'index-single.adoc'
|
|
}
|
|
options doctype: 'book', eruby: 'erubis'
|
|
attributes 'icons': 'font',
|
|
'sectanchors': '',
|
|
'sectnums': '',
|
|
'toc': '',
|
|
'source-highlighter' : 'coderay',
|
|
revnumber: project.version
|
|
}
|
|
|
|
asciidoctor {
|
|
dependsOn makePDF
|
|
backends 'html5'
|
|
sourceDir "$buildDir/asciidoc"
|
|
resources {
|
|
from(sourceDir) {
|
|
include 'images/*', 'css/**', 'js/**'
|
|
}
|
|
}
|
|
options doctype: 'book', eruby: 'erubis'
|
|
attributes 'docinfo': 'shared',
|
|
// use provided stylesheet
|
|
stylesdir: "css/",
|
|
stylesheet: 'spring.css',
|
|
'linkcss': true,
|
|
'icons': 'font',
|
|
'sectanchors': '',
|
|
// use provided highlighter
|
|
'source-highlighter=highlight.js',
|
|
'highlightjsdir=js/highlight',
|
|
'highlightjs-theme=atom-one-dark-reasonable',
|
|
'idprefix': '',
|
|
'idseparator': '-',
|
|
'spring-version': project.version,
|
|
'allow-uri-read': '',
|
|
'toc': 'left',
|
|
'toclevbels': '4',
|
|
revnumber: project.version
|
|
}
|
|
|
|
task reference(dependsOn: asciidoctor) {
|
|
group = 'Documentation'
|
|
description = 'Generate the reference documentation'
|
|
}
|
|
|
|
reference.onlyIf { "$System.env.NO_REFERENCE_TASK" != 'true' || project.hasProperty('ignoreEnvToStopReference') }
|
|
|
|
sonarqube {
|
|
properties {
|
|
property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
|
|
property "sonar.links.homepage", linkHomepage
|
|
property "sonar.links.ci", linkCi
|
|
property "sonar.links.issue", linkIssue
|
|
property "sonar.links.scm", linkScmUrl
|
|
property "sonar.links.scm_dev", linkScmDevConnection
|
|
property "sonar.java.coveragePlugin", "jacoco"
|
|
}
|
|
}
|
|
|
|
task api(type: Javadoc) {
|
|
group = 'Documentation'
|
|
description = 'Generates aggregated Javadoc API documentation.'
|
|
title = "${rootProject.description} ${version} API"
|
|
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
|
options.author = true
|
|
options.header = rootProject.description
|
|
options.overview = 'src/api/overview.html'
|
|
options.stylesheetFile = file("src/api/stylesheet.css")
|
|
options.links(project.ext.javadocLinks)
|
|
source subprojects.collect { project ->
|
|
project.sourceSets.main.allJava
|
|
}
|
|
destinationDir = new File(buildDir, "api")
|
|
classpath = files(subprojects.collect { project ->
|
|
project.sourceSets.main.compileClasspath
|
|
})
|
|
}
|
|
|
|
task schemaZip(type: Zip) {
|
|
group = 'Distribution'
|
|
classifier = 'schema'
|
|
description = "Builds -${classifier} archive containing all " +
|
|
"XSDs for deployment at static.springframework.org/schema."
|
|
|
|
duplicatesStrategy = 'exclude'
|
|
|
|
subprojects.findAll{ !it.name.endsWith('-bom') }.each { subproject ->
|
|
def Properties schemas = new Properties();
|
|
def shortName = subproject.name.replaceFirst("${rootProject.name}-", '')
|
|
if (subproject.name.endsWith("-core")) {
|
|
shortName = ''
|
|
}
|
|
|
|
subproject.sourceSets.main.resources.find {
|
|
it.path.endsWith("META-INF${File.separator}spring.schemas")
|
|
}?.withInputStream { schemas.load(it) }
|
|
|
|
for (def key : schemas.keySet()) {
|
|
File xsdFile = subproject.sourceSets.main.resources.find {
|
|
it.path.replaceAll('\\\\', '/').endsWith(schemas.get(key))
|
|
}
|
|
assert xsdFile != null
|
|
into ("integration/${shortName}") {
|
|
from xsdFile.path
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task docsZip(type: Zip, dependsOn: reference) {
|
|
group = 'Distribution'
|
|
classifier = 'docs'
|
|
description = "Builds -${classifier} archive containing api and reference " +
|
|
"for deployment at static.springframework.org/spring-integration/docs."
|
|
|
|
from('src/dist') {
|
|
include 'changelog.txt'
|
|
}
|
|
|
|
from (api) {
|
|
into 'api'
|
|
}
|
|
|
|
from ('build/asciidoc/html5') {
|
|
into 'reference/html'
|
|
}
|
|
|
|
from ('build/asciidoc/pdf') {
|
|
include "index-single.pdf"
|
|
rename 'index-single.pdf', 'spring-integration-reference.pdf'
|
|
into 'reference/pdf'
|
|
}
|
|
}
|
|
|
|
task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
|
|
group = 'Distribution'
|
|
classifier = 'dist'
|
|
description = "Builds -${classifier} archive, containing all jars and docs, " +
|
|
"suitable for community download page."
|
|
|
|
ext.baseDir = "${project.name}-${project.version}";
|
|
|
|
from('src/dist') {
|
|
include 'readme.txt'
|
|
include 'license.txt'
|
|
include 'notice.txt'
|
|
into "${baseDir}"
|
|
expand(copyright: new Date().format("yyyy"), version: project.version)
|
|
}
|
|
|
|
from(zipTree(docsZip.archivePath)) {
|
|
into "${baseDir}/docs"
|
|
}
|
|
|
|
from(zipTree(schemaZip.archivePath)) {
|
|
into "${baseDir}/schema"
|
|
}
|
|
|
|
subprojects.findAll{ !it.name.endsWith('-bom') }.each { subproject ->
|
|
into ("${baseDir}/libs") {
|
|
from subproject.jar
|
|
from subproject.sourcesJar
|
|
from subproject.javadocJar
|
|
}
|
|
}
|
|
}
|
|
|
|
// Create an optional "with dependencies" distribution.
|
|
// Not published by default; only for use when building from source.
|
|
task depsZip(type: Zip, dependsOn: distZip) { zipTask ->
|
|
group = 'Distribution'
|
|
classifier = 'dist-with-deps'
|
|
description = "Builds -${classifier} archive, containing everything " +
|
|
"in the -${distZip.classifier} archive plus all dependencies."
|
|
|
|
from zipTree(distZip.archivePath)
|
|
|
|
gradle.taskGraph.whenReady { taskGraph ->
|
|
if (taskGraph.hasTask(":${zipTask.name}")) {
|
|
def projectNames = rootProject.subprojects*.name
|
|
def artifacts = new HashSet()
|
|
subprojects.each { subproject ->
|
|
subproject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact ->
|
|
def dependency = artifact.moduleVersion.id
|
|
if (!projectNames.contains(dependency.name)) {
|
|
artifacts << artifact.file
|
|
}
|
|
}
|
|
}
|
|
|
|
zipTask.from(artifacts) {
|
|
into "${distZip.baseDir}/deps"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
artifacts {
|
|
archives distZip
|
|
archives docsZip
|
|
archives schemaZip
|
|
}
|
|
|
|
task dist(dependsOn: assemble) {
|
|
group = 'Distribution'
|
|
description = 'Builds -dist, -docs and -schema distribution archives.'
|
|
}
|