1 Star 0 Fork 7

day / Spring Integration

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 42.74 KB
一键复制 编辑 原始数据 按行查看 历史
Artem Bilan 提交于 2023-12-01 16:40 . Migrate CI/CD to GitHub Actions
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232
buildscript {
ext.kotlinVersion = '1.9.10'
ext.isCI = System.getenv('GITHUB_ACTION')
repositories {
gradlePluginPortal()
mavenCentral()
if (version.endsWith('SNAPSHOT')) {
maven { url 'https://repo.spring.io/snapshot' }
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
}
}
plugins {
id 'base'
id 'io.spring.nohttp' version '0.0.11' apply false
id 'org.ajoberstar.grgit' version '4.1.1'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.jetbrains.dokka' version "$kotlinVersion"
id 'org.antora' version '1.0.0'
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
}
if (isCI) {
apply plugin: 'io.spring.nohttp'
nohttp {
source.include '**/src/**'
source.exclude '**/bin/**', '**/build/**', '**/out/**', '**/target/**', '**/*.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://github.com/spring-projects/spring-integration/issues'
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'
modifiedFiles =
files()
.from {
files(grgit.status().unstaged.modified)
.filter { f -> f.name.endsWith('.java') || f.name.endsWith('.kt') }
}
modifiedFiles.finalizeValueOnRead()
apacheSshdVersion = '2.11.0'
artemisVersion = '2.31.2'
aspectjVersion = '1.9.20.1'
assertjVersion = '3.24.2'
assertkVersion = '0.27.0'
avroVersion = '1.11.3'
awaitilityVersion = '4.2.0'
camelVersion = '4.2.0'
commonsDbcp2Version = '2.11.0'
commonsIoVersion = '2.15.0'
commonsNetVersion = '3.10.0'
curatorVersion = '5.5.0'
debeziumVersion = '2.4.1.Final'
derbyVersion = '10.16.1.1'
findbugsVersion = '3.0.1'
ftpServerVersion = '1.2.0'
graalvmVersion = '23.0.2'
greenmailVersion = '2.1.0-alpha-3'
groovyVersion = '4.0.15'
hamcrestVersion = '2.2'
hazelcastVersion = '5.3.6'
hibernateVersion = '6.3.1.Final'
hsqldbVersion = '2.7.2'
h2Version = '2.2.224'
jacksonVersion = '2.15.3'
jaxbVersion = '4.0.4'
jcifsVersion = '2.1.37'
jeroMqVersion = '0.5.4'
jmsApiVersion = '3.1.0'
jpaApiVersion = '3.1.0'
jrubyVersion = '9.4.3.0'
jsonpathVersion = '2.8.0'
junit4Version = '4.13.2'
junitJupiterVersion = '5.10.1'
jythonVersion = '2.7.3'
kotlinCoroutinesVersion = '1.7.3'
kryoVersion = '5.5.0'
lettuceVersion = '6.3.0.RELEASE'
log4jVersion = '2.21.1'
mailVersion = '2.0.2'
micrometerTracingVersion = '1.2.0'
micrometerVersion = '1.12.0'
mockitoVersion = '5.7.0'
mongoDriverVersion = '4.11.1'
mysqlVersion = '8.0.33'
oracleVersion = '23.3.0.23.09'
pahoMqttClientVersion = '1.2.5'
postgresVersion = '42.6.0'
protobufVersion = '3.25.1'
r2dbch2Version = '1.0.0.RELEASE'
reactorVersion = '2023.0.0'
resilience4jVersion = '2.1.0'
romeToolsVersion = '2.1.0'
rsocketVersion = '1.1.4'
servletApiVersion = '6.0.0'
smackVersion = '4.4.6'
springAmqpVersion = '3.1.0'
springDataVersion = '2023.1.0'
springGraphqlVersion = '1.2.4'
springKafkaVersion = '3.1.0'
springRetryVersion = '2.0.4'
springSecurityVersion = '6.2.0'
springVersion = '6.1.0'
springWsVersion = '4.0.8'
testcontainersVersion = '1.19.2'
tomcatVersion = '10.1.16'
xmlUnitVersion = '2.9.1'
xstreamVersion = '1.4.20'
ztZipVersion = '1.16'
javaProjects = subprojects - project(':spring-integration-bom')
}
allprojects {
group = 'org.springframework.integration'
repositories {
if (project.hasProperty('mavenLocal')) {
mavenLocal()
}
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
if (version.endsWith('SNAPSHOT')) {
maven { url 'https://repo.spring.io/snapshot' }
}
// maven { url 'https://repo.spring.io/libs-staging-local' }
}
ext.javadocLinks = [
'https://docs.oracle.com/en/java/javase/17/docs/api/',
'https://jakarta.ee/specifications/platform/10/apidocs/',
'https://docs.spring.io/spring-framework/docs/current/javadoc-api',
'https://docs.spring.io/spring-amqp/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/docs/current/api/'
] as String[]
apply plugin: 'io.spring.dependency-management'
dependencyManagement {
resolutionStrategy {
cacheChangingModulesFor 0, 'seconds'
}
applyMavenExclusions = false
generatedPomCustomization {
enabled = false
}
imports {
mavenBom "com.fasterxml.jackson:jackson-bom:$jacksonVersion"
mavenBom "io.micrometer:micrometer-bom:$micrometerVersion"
mavenBom "io.micrometer:micrometer-tracing-bom:$micrometerTracingVersion"
mavenBom "io.projectreactor:reactor-bom:$reactorVersion"
mavenBom "org.apache.camel:camel-bom:$camelVersion"
mavenBom "org.apache.groovy:groovy-bom:$groovyVersion"
mavenBom "org.apache.logging.log4j:log4j-bom:$log4jVersion"
mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:$kotlinCoroutinesVersion"
mavenBom "org.junit:junit-bom:$junitJupiterVersion"
mavenBom "org.mockito:mockito-bom:$mockitoVersion"
mavenBom "org.springframework.amqp:spring-amqp-bom:$springAmqpVersion"
mavenBom "org.springframework.data:spring-data-bom:$springDataVersion"
mavenBom "org.springframework.kafka:spring-kafka-bom:$springKafkaVersion"
mavenBom "org.springframework.security:spring-security-bom:$springSecurityVersion"
mavenBom "org.springframework:spring-framework-bom:$springVersion"
mavenBom "org.springframework.ws:spring-ws-bom:$springWsVersion"
mavenBom "org.testcontainers:testcontainers-bom:$testcontainersVersion"
}
}
}
configure(javaProjects) { subproject ->
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'checkstyle'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply from: "${rootDir}/gradle/publish-maven.gradle"
sourceSets {
test {
resources {
srcDirs = ['src/test/resources', 'src/test/java']
}
}
}
java {
withJavadocJar()
withSourcesJar()
registerFeature('optional') {
usingSourceSet(sourceSets.main)
}
registerFeature('provided') {
usingSourceSet(sourceSets.main)
}
}
compileJava {
options.release = 17
}
compileTestJava {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
options.encoding = 'UTF-8'
}
compileKotlin {
compilerOptions {
allWarningsAsErrors = true
}
}
tasks.withType(JavaCompile).configureEach {
options.fork = true
}
tasks.withType(Javadoc) {
options.addBooleanOption('Xdoclint:syntax', true) // only check syntax with doclint
options.addBooleanOption('Werror', true) // fail build on Javadoc warnings
}
eclipse {
project {
natures += 'org.springframework.ide.eclipse.core.springnature'
}
}
// dependencies that are common across all java projects
dependencies {
if (!(subproject.name ==~ /.*-test.*/)) {
testImplementation(project(':spring-integration-test-support')) {
exclude group: 'org.hamcrest'
}
}
if (subproject.name !in ['spring-integration-test-support', 'spring-integration-core']) {
api project(':spring-integration-core')
}
// JSR-305 only used for non-required meta-annotations
compileOnly "com.google.code.findbugs:annotations:$findbugsVersion"
testImplementation "com.google.code.findbugs:annotations:$findbugsVersion"
testImplementation("org.awaitility:awaitility:$awaitilityVersion") {
exclude group: 'org.hamcrest'
}
testImplementation("junit:junit:$junit4Version") {
exclude group: 'org.hamcrest'
}
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.junit.jupiter:junit-jupiter-params'
testImplementation("com.willowtreeapps.assertk:assertk-jvm:$assertkVersion") {
exclude group: 'org.jetbrains.kotlin'
}
testImplementation 'org.jetbrains.kotlin:kotlin-reflect'
testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
testImplementation 'io.projectreactor:reactor-test'
testImplementation 'org.testcontainers:junit-jupiter'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
// To support JUnit 4 tests
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
testRuntimeOnly 'org.apache.logging.log4j:log4j-core'
testRuntimeOnly 'org.apache.logging.log4j:log4j-jcl'
testRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl'
testRuntimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl'
}
// enable all compiler warnings; individual projects may customize further
ext.xLintArg = '-Xlint:all,-options,-processing'
[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg, '-parameters']
tasks.register('updateCopyrights') {
onlyIf { !isCI }
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
test {
maxHeapSize = '2g'
jvmArgs '-XX:+HeapDumpOnOutOfMemoryError'
}
tasks.register('testAll', Test) { dependsOn['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)
if (name ==~ /(testAll)/) {
systemProperty 'RUN_LONG_INTEGRATION_TESTS', 'true'
}
environment 'SI_FATAL_WHEN_NO_BEANFACTORY', 'true'
useJUnitPlatform()
enableAssertions = false
}
checkstyle {
configDirectory.set(rootProject.file('src/checkstyle'))
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.12.5'
}
jar {
manifest {
attributes(
'Implementation-Version': project.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 'notice.txt'
into 'META-INF'
expand(copyright: new Date().format('yyyy'), version: project.version)
}
from("${rootProject.projectDir}") {
include 'LICENSE.txt'
into 'META-INF'
}
}
tasks.register('checkClasspathForConflicts') {
onlyIf { isCI }
inputs.files(configurations.runtimeClasspath)
def ignored = ['module-info.class']
def errors = ['Found classpath conflicts:\n']
Map<String, Set<String>> classpathContents = [:]
doLast {
inputs.files.each { file ->
new java.util.jar.JarFile(file)
.stream()
.filter { !it.name.startsWith('META-INF/') && it.name.endsWith('.class') && !ignored.contains(it.name) }
.each { classpathContents.computeIfAbsent(it.name, { [] as Set }).add(file.absolutePath) }
}
def conflicts = classpathContents.findAll { it.value.size() > 1 }
conflicts.each {
errors += " $it.key\n"
it.value.each {
errors += " $it\n"
}
}
if (errors.size() > 1) {
throw new InvalidUserDataException(errors.toString().replaceAll(~/,\s/, '') - '[' - ']')
}
}
}
check.dependsOn checkClasspathForConflicts, javadoc
publishing {
publications {
mavenJava(MavenPublication) {
suppressAllPomMetadataWarnings()
from components.java
pom.withXml {
def pomDeps = asNode().dependencies.first()
subproject.configurations.providedImplementation.allDependencies.each { dep ->
pomDeps.remove(pomDeps.'*'.find { it.artifactId.text() == dep.name })
pomDeps.appendNode('dependency').with {
it.appendNode('groupId', dep.group)
it.appendNode('artifactId', dep.name)
it.appendNode('version', dep.version)
it.appendNode('scope', 'provided')
}
}
}
}
}
}
}
project('spring-integration-test-support') {
description = 'Spring Integration Test Support - **No SI Dependencies Allowed**'
dependencies {
compileOnly 'org.apiguardian:apiguardian-api:1.0.0'
api "org.hamcrest:hamcrest-library:$hamcrestVersion"
api 'org.mockito:mockito-core'
api "org.assertj:assertj-core:$assertjVersion"
api 'org.springframework:spring-context'
api 'org.springframework:spring-messaging'
api 'org.springframework:spring-test'
optionalApi("junit:junit:$junit4Version") {
exclude group: 'org.hamcrest'
}
optionalApi 'org.junit.jupiter:junit-jupiter-api'
optionalApi 'org.apache.logging.log4j:log4j-core'
}
}
project('spring-integration-amqp') {
description = 'Spring Integration AMQP Support'
dependencies {
api 'org.springframework.amqp:spring-rabbit'
optionalApi 'org.springframework.amqp:spring-rabbit-stream'
testImplementation 'org.springframework.amqp:spring-rabbit-junit'
testImplementation project(':spring-integration-stream')
testImplementation 'org.springframework:spring-web'
testImplementation 'org.testcontainers:rabbitmq'
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
}
}
project('spring-integration-camel') {
description = 'Spring Integration support for Apache Camel'
dependencies {
api 'org.apache.camel:camel-core-model'
testImplementation 'org.apache.camel:camel-test-junit5'
testImplementation('org.apache.camel:camel-spring') {
exclude group: 'org.springframework'
}
}
}
project('spring-integration-cassandra') {
description = 'Spring Integration Support for Apache Cassandra'
dependencies {
api 'org.springframework.data:spring-data-cassandra'
testImplementation 'org.testcontainers:cassandra'
testRuntimeOnly "commons-io:commons-io:$commonsIoVersion"
}
}
project('spring-integration-core') {
description = 'Spring Integration Core'
apply plugin: 'org.jetbrains.dokka'
dependencies {
api 'org.springframework:spring-aop'
api 'org.springframework:spring-context'
api 'org.springframework:spring-messaging'
api 'org.springframework:spring-tx'
api("org.springframework.retry:spring-retry:$springRetryVersion") {
exclude group: 'org.springframework'
}
api 'io.projectreactor:reactor-core'
api 'io.micrometer:micrometer-observation'
optionalApi 'com.fasterxml.jackson.core:jackson-databind'
optionalApi 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8'
optionalApi 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
optionalApi 'com.fasterxml.jackson.datatype:jackson-datatype-joda'
optionalApi('com.fasterxml.jackson.module:jackson-module-kotlin') {
exclude group: 'org.jetbrains.kotlin'
}
optionalApi "com.google.protobuf:protobuf-java:$protobufVersion"
optionalApi "com.jayway.jsonpath:json-path:$jsonpathVersion"
optionalApi "com.esotericsoftware:kryo:$kryoVersion"
optionalApi 'io.micrometer:micrometer-core'
optionalApi('io.micrometer:micrometer-tracing') {
exclude group: 'aopalliance'
}
optionalApi "io.github.resilience4j:resilience4j-ratelimiter:$resilience4jVersion"
optionalApi "org.apache.avro:avro:$avroVersion"
optionalApi 'org.jetbrains.kotlinx:kotlinx-coroutines-reactor'
testImplementation "com.google.protobuf:protobuf-java-util:$protobufVersion"
testImplementation "org.aspectj:aspectjweaver:$aspectjVersion"
testImplementation 'io.micrometer:micrometer-observation-test'
testImplementation('io.micrometer:micrometer-tracing-integration-test') {
exclude group: 'io.opentelemetry'
exclude group: 'com.wavefront'
exclude group: 'io.micrometer', module: 'micrometer-tracing-bridge-otel'
}
}
dokkaHtmlPartial {
outputDirectory.set(new File(buildDir, 'kdoc'))
dokkaSourceSets {
main {
sourceRoots.setFrom(file('src/main/kotlin'))
classpath.from(sourceSets['main'].runtimeClasspath)
externalDocumentationLink {
url.set(new URL("https://docs.spring.io/spring-integration/docs/$version/api/"))
packageListUrl.set(file("$buildDir/docs/javadoc/element-list").toURI().toURL())
}
externalDocumentationLink {
url.set(new URL('https://projectreactor.io/docs/core/release/api/'))
}
externalDocumentationLink {
url.set(new URL('https://www.reactive-streams.org/reactive-streams-1.0.3-javadoc/'))
}
}
}
}
}
project('spring-integration-debezium') {
description = 'Spring Integration Debezium Support'
dependencies {
api("io.debezium:debezium-embedded:$debeziumVersion") {
exclude group: 'org.glassfish.jersey.containers', module: 'jersey-container-servlet'
exclude group: 'org.glassfish.jersey.inject', module: 'jersey-hk2'
exclude group: 'jakarta.xml.bind', module: 'jakarta.xml.bind-api'
exclude group: 'jakarta.activation', module: 'jakarta.activation-api'
exclude group: 'javax.activation', module: 'javax.activation-api'
}
testImplementation "io.debezium:debezium-connector-mysql:$debeziumVersion"
testImplementation 'org.testcontainers:mysql'
}
}
project('spring-integration-event') {
description = 'Spring Integration ApplicationEvent Support'
}
project('spring-integration-feed') {
description = 'Spring Integration RSS Feed Support'
dependencies {
api "com.rometools:rome:$romeToolsVersion"
}
}
project('spring-integration-file') {
description = 'Spring Integration File Support'
dependencies {
api "commons-io:commons-io:$commonsIoVersion"
testImplementation project(':spring-integration-redis')
testImplementation project(':spring-integration-redis').sourceSets.test.output
testImplementation project(':spring-integration-jdbc')
testImplementation "com.h2database:h2:$h2Version"
testImplementation "io.lettuce:lettuce-core:$lettuceVersion"
testImplementation "com.jayway.jsonpath:json-path:$jsonpathVersion"
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
}
}
project('spring-integration-ftp') {
description = 'Spring Integration FTP Support'
dependencies {
api project(':spring-integration-file')
api "commons-net:commons-net:$commonsNetVersion"
api 'org.springframework:spring-context-support'
optionalApi "org.apache.ftpserver:ftpserver-core:$ftpServerVersion"
testImplementation project(':spring-integration-file').sourceSets.test.output
}
}
project('spring-integration-graphql') {
description = 'Spring Integration GraphQL Support'
dependencies {
api "org.springframework.graphql:spring-graphql:$springGraphqlVersion"
testImplementation 'org.springframework:spring-web'
}
}
project('spring-integration-groovy') {
description = 'Spring Integration Groovy Support'
apply plugin: 'groovy'
dependencies {
api project(':spring-integration-scripting')
api 'org.apache.groovy:groovy'
api 'org.springframework:spring-context-support'
testImplementation 'org.springframework:spring-web'
testRuntimeOnly 'org.apache.groovy:groovy-dateutil'
}
tasks.withType(JavaForkOptions) {
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.base/java.util=ALL-UNNAMED'
}
}
project('spring-integration-hazelcast') {
description = 'Spring Integration Hazelcast Support'
dependencies {
api "com.hazelcast:hazelcast:$hazelcastVersion"
testImplementation project(':spring-integration-jmx')
}
tasks.withType(JavaForkOptions) {
jvmArgs '--add-modules', 'java.se',
'--add-exports', 'java.base/jdk.internal.ref=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.base/sun.nio.ch=ALL-UNNAMED',
'--add-opens', 'java.management/sun.management=ALL-UNNAMED',
'--add-opens', 'jdk.management/com.sun.management.internal=ALL-UNNAMED',
'-Dhazelcast.logging.type=log4j2'
}
}
project('spring-integration-http') {
description = 'Spring Integration HTTP Support'
dependencies {
api 'org.springframework:spring-webmvc'
providedImplementation "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
optionalApi "com.rometools:rome:$romeToolsVersion"
optionalApi 'org.springframework:spring-webflux'
testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion"
testImplementation 'org.springframework.security:spring-security-messaging'
testImplementation 'org.springframework.security:spring-security-config'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
testRuntimeOnly "com.jayway.jsonpath:json-path:$jsonpathVersion"
}
}
project('spring-integration-ip') {
description = 'Spring Integration IP Support'
dependencies {
testImplementation project(':spring-integration-stream')
testImplementation project(':spring-integration-event')
testRuntimeOnly "com.esotericsoftware:kryo:$kryoVersion"
testRuntimeOnly 'com.fasterxml.jackson.core:jackson-databind'
}
tasks.withType(JavaForkOptions) {
jvmArgs '--add-opens', 'java.base/java.nio.channels.spi=ALL-UNNAMED',
'--add-opens', 'java.base/java.util=ALL-UNNAMED'
}
}
project('spring-integration-jdbc') {
description = 'Spring Integration JDBC Support'
dependencies {
api 'org.springframework:spring-jdbc'
optionalApi "org.postgresql:postgresql:$postgresVersion"
testImplementation "com.h2database:h2:$h2Version"
testImplementation "org.hsqldb:hsqldb:$hsqldbVersion"
testImplementation "org.apache.derby:derby:$derbyVersion"
testImplementation "org.apache.derby:derbytools:$derbyVersion"
testImplementation "org.apache.derby:derbyclient:$derbyVersion"
testImplementation "org.postgresql:postgresql:$postgresVersion"
testImplementation "mysql:mysql-connector-java:$mysqlVersion"
testImplementation("org.apache.commons:commons-dbcp2:$commonsDbcp2Version") {
exclude group: 'commons-logging'
}
testImplementation 'org.testcontainers:mysql'
testImplementation 'org.testcontainers:postgresql'
testImplementation 'org.testcontainers:oracle-xe'
testRuntimeOnly 'com.fasterxml.jackson.core:jackson-databind'
testRuntimeOnly "com.oracle.database.jdbc:ojdbc11:$oracleVersion"
}
}
project('spring-integration-jms') {
description = 'Spring Integration JMS Support'
dependencies {
api 'org.springframework:spring-jms'
providedImplementation "jakarta.jms:jakarta.jms-api:$jmsApiVersion"
testImplementation("org.apache.activemq:artemis-server:$artemisVersion") {
exclude group: 'org.jboss.logmanager'
}
testImplementation "org.apache.activemq:artemis-jakarta-client:$artemisVersion"
testImplementation 'org.springframework:spring-oxm'
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
testImplementation 'io.micrometer:micrometer-observation-test'
}
}
project('spring-integration-jmx') {
description = 'Spring Integration JMX Support'
dependencies {
testImplementation "org.aspectj:aspectjweaver:$aspectjVersion"
}
}
project('spring-integration-jpa') {
description = 'Spring Integration JPA Support'
dependencies {
api 'org.springframework:spring-orm'
optionalApi "jakarta.persistence:jakarta.persistence-api:$jpaApiVersion"
testImplementation 'org.springframework.data:spring-data-jpa'
testImplementation "com.h2database:h2:$h2Version"
testImplementation "org.hibernate.orm:hibernate-core:$hibernateVersion"
}
}
project('spring-integration-kafka') {
description = 'Spring Integration for Apache Kafka'
dependencies {
api 'org.springframework.kafka:spring-kafka'
testImplementation 'org.springframework.kafka:spring-kafka-test'
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
}
}
project('spring-integration-mail') {
description = 'Spring Integration Mail Support'
dependencies {
api 'org.springframework:spring-context-support'
providedImplementation "org.eclipse.angus:jakarta.mail:$mailVersion"
testImplementation "com.icegreen:greenmail:$greenmailVersion"
testRuntimeOnly 'org.apache.logging.log4j:log4j-jul'
}
}
project('spring-integration-mongodb') {
description = 'Spring Integration MongoDB Support'
dependencies {
api 'org.springframework.data:spring-data-mongodb'
optionalApi "org.mongodb:mongodb-driver-sync:$mongoDriverVersion"
optionalApi "org.mongodb:mongodb-driver-reactivestreams:$mongoDriverVersion"
testImplementation 'org.testcontainers:mongodb'
}
}
project('spring-integration-r2dbc') {
description = 'Spring Integration R2DBC Support'
dependencies {
api 'org.springframework.data:spring-data-r2dbc'
api 'org.springframework:spring-r2dbc'
testImplementation "io.r2dbc:r2dbc-h2:$r2dbch2Version"
}
}
project('spring-integration-mqtt') {
description = 'Spring Integration MQTT Support'
dependencies {
api "org.eclipse.paho:org.eclipse.paho.client.mqttv3:$pahoMqttClientVersion"
optionalApi "org.eclipse.paho:org.eclipse.paho.mqttv5.client:$pahoMqttClientVersion"
testImplementation project(':spring-integration-jmx')
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
}
}
project('spring-integration-redis') {
description = 'Spring Integration Redis Support'
dependencies {
api 'org.springframework.data:spring-data-redis'
testImplementation "io.lettuce:lettuce-core:$lettuceVersion"
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
}
tasks.withType(JavaForkOptions) {
jvmArgs '--add-opens', 'java.base/java.util=ALL-UNNAMED'
}
}
project('spring-integration-rsocket') {
description = 'Spring Integration RSocket Support'
dependencies {
api "io.rsocket:rsocket-transport-netty:$rsocketVersion"
}
}
project('spring-integration-scripting') {
description = 'Spring Integration Scripting Support'
dependencies {
optionalApi 'org.jetbrains.kotlin:kotlin-scripting-jsr223'
providedImplementation "org.graalvm.sdk:graal-sdk:$graalvmVersion"
providedImplementation "org.graalvm.js:js:$graalvmVersion"
testImplementation "org.jruby:jruby-complete:$jrubyVersion"
testImplementation 'org.apache.groovy:groovy-jsr223'
testImplementation "org.python:jython-standalone:$jythonVersion"
}
tasks.withType(JavaForkOptions) {
jvmArgs '--add-opens', 'java.base/sun.nio.ch=ALL-UNNAMED',
'--add-opens', 'java.base/java.io=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.base/java.util=ALL-UNNAMED'
}
}
project('spring-integration-security') {
description = 'Spring Integration Security Support'
dependencies {
api 'org.springframework.security:spring-security-messaging'
}
}
project('spring-integration-sftp') {
description = 'Spring Integration SFTP Support'
dependencies {
api project(':spring-integration-file')
api 'org.springframework:spring-context-support'
api("org.apache.sshd:sshd-sftp:$apacheSshdVersion") {
exclude group: 'org.slf4j', module: 'jcl-over-slf4j'
}
testImplementation project(':spring-integration-event')
testImplementation project(':spring-integration-file').sourceSets.test.output
testRuntimeOnly 'net.i2p.crypto:eddsa:0.3.0'
}
}
project('spring-integration-smb') {
description = 'Spring Integration SMB Support'
dependencies {
api project(':spring-integration-file')
api "org.codelibs:jcifs:$jcifsVersion"
testImplementation project(':spring-integration-file').sourceSets.test.output
}
}
project('spring-integration-stomp') {
description = 'Spring Integration STOMP Support'
dependencies {
optionalApi 'org.springframework:spring-websocket'
testImplementation project(':spring-integration-websocket')
testImplementation project(':spring-integration-websocket').sourceSets.test.output
testImplementation project(':spring-integration-event')
testImplementation("org.apache.activemq:artemis-stomp-protocol:$artemisVersion") {
exclude group: 'org.jboss.logmanager'
exclude group: 'io.netty'
}
testImplementation "org.apache.tomcat.embed:tomcat-embed-websocket:$tomcatVersion"
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
testRuntimeOnly 'org.springframework:spring-webmvc'
testRuntimeOnly 'io.projectreactor.netty:reactor-netty-http'
}
tasks.withType(JavaForkOptions) {
jvmArgs '--add-opens', 'java.base/java.io=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.rmi/sun.rmi.transport=ALL-UNNAMED'
}
}
project('spring-integration-stream') {
description = 'Spring Integration Stream Support'
tasks.withType(JavaForkOptions) {
jvmArgs '--add-opens', 'java.base/java.io=ALL-UNNAMED'
}
}
project('spring-integration-syslog') {
description = 'Spring Integration Syslog Support'
dependencies {
api project(':spring-integration-ip')
}
}
project('spring-integration-test') {
description = 'Spring Integration Testing Framework'
dependencies {
api project(':spring-integration-test-support')
}
}
project('spring-integration-webflux') {
description = 'Spring Integration HTTP Support'
dependencies {
api(project(':spring-integration-http')) {
exclude group: 'org.springframework', module: 'spring-webmvc'
}
api 'org.springframework:spring-webflux'
optionalApi 'io.projectreactor.netty:reactor-netty-http'
testImplementation "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
testImplementation "org.hamcrest:hamcrest-core:$hamcrestVersion"
testImplementation 'org.springframework:spring-webmvc'
testImplementation 'org.springframework.security:spring-security-config'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'com.fasterxml.jackson.core:jackson-databind'
testImplementation 'io.micrometer:micrometer-observation-test'
testImplementation('io.micrometer:micrometer-tracing-integration-test') {
exclude group: 'io.opentelemetry'
exclude group: 'com.wavefront'
exclude group: 'io.micrometer', module: 'micrometer-tracing-bridge-otel'
}
testRuntimeOnly "com.jayway.jsonpath:json-path:$jsonpathVersion"
}
}
project('spring-integration-websocket') {
description = 'Spring Integration WebSockets Support'
dependencies {
api 'org.springframework:spring-websocket'
optionalApi 'org.springframework:spring-webmvc'
providedImplementation "jakarta.servlet:jakarta.servlet-api:$servletApiVersion"
testImplementation project(':spring-integration-event')
testImplementation "org.apache.tomcat.embed:tomcat-embed-websocket:$tomcatVersion"
testRuntimeOnly 'com.fasterxml.jackson.core:jackson-databind'
}
tasks.withType(JavaForkOptions) {
jvmArgs '--add-opens', 'java.base/java.io=ALL-UNNAMED',
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
'--add-opens', 'java.rmi/sun.rmi.transport=ALL-UNNAMED'
}
}
project('spring-integration-ws') {
description = 'Spring Integration Web Services Support'
dependencies {
api 'org.springframework:spring-oxm'
api 'org.springframework:spring-webmvc'
api('org.springframework.ws:spring-ws-core') {
exclude group: 'org.springframework'
exclude group: 'org.glassfish.jaxb'
}
providedImplementation "com.sun.xml.bind:jaxb-impl:$jaxbVersion"
testImplementation "com.thoughtworks.xstream:xstream:$xstreamVersion"
testImplementation('org.springframework.ws:spring-ws-support') {
exclude group: 'org.springframework'
}
testImplementation 'org.springframework:spring-jms'
testImplementation "jakarta.jms:jakarta.jms-api:$jmsApiVersion"
testImplementation "org.igniterealtime.smack:smack-tcp:$smackVersion"
testImplementation "org.igniterealtime.smack:smack-extensions:$smackVersion"
testImplementation "org.eclipse.angus:angus-mail:$mailVersion"
}
}
project('spring-integration-xml') {
description = 'Spring Integration XML Support'
dependencies {
api 'org.springframework:spring-oxm'
api('org.springframework.ws:spring-xml') {
exclude group: 'org.springframework'
}
optionalApi('org.springframework.ws:spring-ws-core') {
exclude group: 'org.springframework'
}
testImplementation "com.sun.xml.bind:jaxb-impl:$jaxbVersion"
testImplementation "org.xmlunit:xmlunit-assertj3:$xmlUnitVersion"
}
tasks.withType(JavaForkOptions) {
jvmArgs '--add-opens', 'java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED'
}
}
project('spring-integration-xmpp') {
description = 'Spring Integration XMPP Support'
dependencies {
api "org.igniterealtime.smack:smack-tcp:$smackVersion"
api "org.igniterealtime.smack:smack-java8:$smackVersion"
api "org.igniterealtime.smack:smack-extensions:$smackVersion"
testImplementation project(':spring-integration-stream')
testImplementation "org.igniterealtime.smack:smack-experimental:$smackVersion"
}
}
project('spring-integration-zeromq') {
description = 'Spring Integration ZeroMQ Support'
dependencies {
api "org.zeromq:jeromq:$jeroMqVersion"
optionalApi 'com.fasterxml.jackson.core:jackson-databind'
}
}
project('spring-integration-zip') {
description = 'Spring Integration Zip Support'
dependencies {
api project(':spring-integration-file')
api "org.zeroturnaround:zt-zip:$ztZipVersion"
}
}
project('spring-integration-zookeeper') {
description = 'Spring Integration Zookeeper Support'
dependencies {
api "org.apache.curator:curator-recipes:$curatorVersion"
testImplementation "org.apache.curator:curator-test:$curatorVersion"
}
}
project('spring-integration-bom') {
description = 'Spring Integration (Bill of Materials)'
apply plugin: 'java-platform'
apply from: "${rootDir}/gradle/publish-maven.gradle"
dependencies {
constraints {
javaProjects.sort { "$it.name" }.each {
api it
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.javaPlatform
}
}
}
}
tasks.register('api', Javadoc) {
group = 'Documentation'
description = 'Generates aggregated Javadoc API documentation.'
title = "${rootProject.description} ${version} API"
options {
encoding = 'UTF-8'
memberLevel = JavadocMemberLevel.PROTECTED
author = true
header = rootProject.description
use = true
overview = 'src/api/overview.html'
splitIndex = true
links(project.ext.javadocLinks)
addBooleanOption('Xdoclint:syntax', true) // only check syntax with doclint
}
source javaProjects.collect { project ->
project.sourceSets.main.allJava
}
destinationDir = new File(buildDir, 'api')
classpath = files(javaProjects.collect { project ->
project.sourceSets.main.compileClasspath
})
}
dokkaHtmlMultiModule {
dependsOn 'api'
moduleName.set('spring-integration')
outputDirectory.set(file("$buildDir/kdoc"))
}
apply from: "${rootDir}/gradle/docs.gradle"
tasks.register('schemaZip', Zip) {
group = 'Distribution'
archiveClassifier = 'schema'
description = "Builds -${archiveClassifier} archive containing all " +
"XSDs for deployment at static.springframework.org/schema."
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
javaProjects.each { subproject ->
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
rename { String fileName ->
String[] versionNumbers = project.version.split(/\./, 3)
fileName.replace('.xsd', "-${versionNumbers[0]}.${versionNumbers[1]}.xsd")
}
}
}
}
}
tasks.register('docsZip', Zip) {
dependsOn 'dokkaHtmlMultiModule'
group = 'Distribution'
archiveClassifier = 'docs'
description = "Builds -${archiveClassifier} 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(dokkaHtmlMultiModule.outputDirectory) {
into 'kdoc-api'
}
}
tasks.register('distZip', Zip) {
dependsOn 'docsZip'
dependsOn 'schemaZip'
group = 'Distribution'
archiveClassifier = 'dist'
description = "Builds -${archiveClassifier} archive, containing all jars and docs, " +
"suitable for community download page."
ext.baseDir = "${project.name}-${project.version}"
from('src/dist') {
include 'readme.txt'
include 'notice.txt'
into "${baseDir}"
expand(copyright: new Date().format('yyyy'), version: project.version)
}
from("$project.rootDir") {
include 'LICENSE.txt'
into "${baseDir}"
}
from(zipTree(docsZip.archiveFile)) {
into "${baseDir}/docs"
}
from(zipTree(schemaZip.archiveFile)) {
into "${baseDir}/schema"
}
javaProjects.each { subproject ->
into("${baseDir}/libs") {
from subproject.jar
from subproject.sourcesJar
from subproject.javadocJar
}
}
from(project(':spring-integration-bom').generatePomFileForMavenJavaPublication) {
into "${baseDir}/libs"
rename 'pom-default.xml', "spring-integration-bom-${project.version}.xml"
}
}
tasks.register('dist') {
dependsOn assemble
group = 'Distribution'
description = 'Builds -dist, -docs and -schema distribution archives.'
}
apply from: "${rootDir}/gradle/publish-maven.gradle"
publishing {
publications {
mavenJava(MavenPublication) {
artifact docsZip
artifact schemaZip
artifact distZip
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lvxianson/spring-integration.git
git@gitee.com:lvxianson/spring-integration.git
lvxianson
spring-integration
Spring Integration
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891