Skip to content

Commit d1438e8

Browse files
committed
Upgrade dependencies; prepare for release
* Clean up code style in Gradle configs * Fix JavaDoc errors * Make JUnit 4 as `optional` dependency for `spring-integration-test-support` * Remove redundant `javax.activation-api` from some modules
1 parent b97bedf commit d1438e8

File tree

6 files changed

+66
-72
lines changed

6 files changed

+66
-72
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
Thanks for contributing to Spring Integration.
3-
Please provide a brief description of your pull-request and reference any related issue numbers (prefix references with #).
3+
Please provide a brief description of your pull-request and reference any related issue numbers (prefix references with #) or StackOverflow questions.
44
55
See the [Contributor Guidelines for more information](https://github.com/spring-projects/spring-integration/blob/master/CONTRIBUTING.adoc).
66
-->

build.gradle

Lines changed: 44 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ plugins {
1515
id 'org.sonarqube' version '2.8'
1616
id 'io.spring.nohttp' version '0.0.5.RELEASE' apply false
1717
id 'org.ajoberstar.grgit' version '4.1.0'
18-
id "io.spring.dependency-management" version '1.0.11.RELEASE'
19-
id 'com.jfrog.artifactory' version '4.18.3' apply false
18+
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
19+
id 'com.jfrog.artifactory' version '4.20.0' apply false
2020
id 'org.jetbrains.dokka' version '0.10.1'
21-
id 'org.asciidoctor.jvm.pdf' version '3.3.0'
22-
id 'org.asciidoctor.jvm.gems' version '3.3.0'
23-
id 'org.asciidoctor.jvm.convert' version '3.3.0'
21+
id 'org.asciidoctor.jvm.pdf' version '3.3.1'
22+
id 'org.asciidoctor.jvm.gems' version '3.3.1'
23+
id 'org.asciidoctor.jvm.convert' version '3.3.1'
2424
}
2525

2626
if (System.getenv('GITHUB_ACTION') || System.getenv('bamboo_buildKey')) {
@@ -46,11 +46,11 @@ ext {
4646
modifiedFiles =
4747
files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') || f.name.endsWith('.kt') }
4848

49-
activeMqVersion = '5.16.0'
49+
activeMqVersion = '5.16.1'
5050
apacheSshdVersion = '2.6.0'
5151
aspectjVersion = '1.9.6'
52-
assertjVersion = '3.18.1'
53-
assertkVersion = '0.23'
52+
assertjVersion = '3.19.0'
53+
assertkVersion = '0.23.1'
5454
avroVersion = '1.10.1'
5555
awaitilityVersion = '4.0.3'
5656
commonsDbcp2Version = '2.8.0'
@@ -63,49 +63,48 @@ ext {
6363
groovyVersion = '3.0.7'
6464
hamcrestVersion = '2.2'
6565
hazelcastVersion = '4.1.1'
66-
hibernateVersion = '5.4.27.Final'
66+
hibernateVersion = '5.4.28.Final'
6767
hsqldbVersion = '2.5.1'
6868
h2Version = '1.4.200'
6969
jacksonVersion = '2.12.1'
7070
javaxActivationVersion = '1.2.0'
7171
jaxbVersion = '2.3.3'
7272
jeroMqVersion = '0.5.2'
7373
jmsApiVersion = '2.0.1'
74-
jpa21ApiVersion = '1.0.2.Final'
7574
jpaApiVersion = '2.7.7'
7675
jrubyVersion = '9.2.14.0'
7776
jschVersion = '0.1.55'
7877
jsonpathVersion = '2.4.0'
79-
junit4Version = '4.13.1'
78+
junit4Version = '4.13.2'
8079
junitJupiterVersion = '5.7.0'
8180
jythonVersion = '2.7.2'
8281
kryoShadedVersion = '4.0.2'
83-
lettuceVersion = '6.0.2.RELEASE'
82+
lettuceVersion = '6.1.0.M1'
8483
log4jVersion = '2.14.0'
8584
mailVersion = '1.6.5'
86-
micrometerVersion = '1.6.3'
87-
mockitoVersion = '3.7.0'
85+
micrometerVersion = '1.6.4'
86+
mockitoVersion = '3.7.7'
8887
mongoDriverVersion = '4.2.0'
89-
mysqlVersion = '8.0.22'
88+
mysqlVersion = '8.0.23'
9089
pahoMqttClientVersion = '1.2.5'
9190
postgresVersion = '42.2.18'
9291
r2dbch2Version='0.8.4.RELEASE'
9392
reactorVersion = '2020.0.3'
94-
resilience4jVersion = '1.6.1'
93+
resilience4jVersion = '1.7.0'
9594
romeToolsVersion = '1.15.0'
9695
rsocketVersion = '1.1.0'
9796
saajVersion = '1.5.2'
9897
servletApiVersion = '4.0.1'
9998
smackVersion = '4.3.5'
10099
soapVersion = '1.4.0'
101-
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.3.5-SNAPSHOT'
102-
springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : '2021.0.0-SNAPSHOT'
103-
springKafkaVersion = '2.7.0-SNAPSHOT'
100+
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.3.5'
101+
springDataVersion = project.hasProperty('springDataVersion') ? project.springDataVersion : '2021.0.0-M3'
102+
springKafkaVersion = '2.7.0-M2'
104103
springRetryVersion = '1.3.1'
105-
springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.5.0-SNAPSHOT'
106-
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.3.4-SNAPSHOT'
107-
springWsVersion = '3.1.0-SNAPSHOT'
108-
tomcatVersion = '9.0.41'
104+
springSecurityVersion = project.hasProperty('springSecurityVersion') ? project.springSecurityVersion : '5.5.0-M2'
105+
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.3.4'
106+
springWsVersion = '3.1.0-M1'
107+
tomcatVersion = '9.0.43'
109108
xmlUnitVersion = '2.8.2'
110109
xstreamVersion = '1.4.15'
111110

@@ -137,7 +136,7 @@ allprojects {
137136
'https://docs.spring.io/spring-ws/docs/current/api/'
138137
] as String[]
139138

140-
apply plugin: "io.spring.dependency-management"
139+
apply plugin: 'io.spring.dependency-management'
141140

142141
dependencyManagement {
143142
resolutionStrategy {
@@ -236,6 +235,9 @@ configure(javaProjects) { subproject ->
236235
testImplementation("org.awaitility:awaitility:$awaitilityVersion") {
237236
exclude group: 'org.hamcrest'
238237
}
238+
testImplementation ("junit:junit:$junit4Version") {
239+
exclude group: 'org.hamcrest'
240+
}
239241
testImplementation 'org.junit.jupiter:junit-jupiter-api'
240242
testImplementation ("com.willowtreeapps.assertk:assertk-jvm:$assertkVersion") {
241243
exclude group: 'org.jetbrains.kotlin'
@@ -335,8 +337,8 @@ configure(javaProjects) { subproject ->
335337
}
336338

337339
checkstyle {
338-
configDirectory.set(rootProject.file("src/checkstyle"))
339-
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '8.39'
340+
configDirectory.set(rootProject.file('src/checkstyle'))
341+
toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '8.40'
340342
}
341343

342344
jar {
@@ -392,14 +394,14 @@ project('spring-integration-test-support') {
392394
dependencies {
393395
compileOnly 'org.apiguardian:apiguardian-api:1.0.0'
394396
api "org.hamcrest:hamcrest-library:$hamcrestVersion"
395-
api ("junit:junit:$junit4Version") {
396-
exclude group: 'org.hamcrest'
397-
}
398397
api "org.mockito:mockito-core:$mockitoVersion"
399398
api "org.assertj:assertj-core:$assertjVersion"
400399
api 'org.springframework:spring-context'
401400
api 'org.springframework:spring-messaging'
402401
api 'org.springframework:spring-test'
402+
optionalApi ("junit:junit:$junit4Version") {
403+
exclude group: 'org.hamcrest'
404+
}
403405
optionalApi 'org.junit.jupiter:junit-jupiter-api'
404406
optionalApi 'org.apache.logging.log4j:log4j-core'
405407
}
@@ -441,8 +443,8 @@ project('spring-integration-core') {
441443
optionalApi "org.apache.avro:avro:$avroVersion"
442444
optionalApi 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
443445

444-
testImplementation ("org.aspectj:aspectjweaver:$aspectjVersion")
445-
testImplementation ('com.fasterxml.jackson.datatype:jackson-datatype-jsr310')
446+
testImplementation "org.aspectj:aspectjweaver:$aspectjVersion"
447+
testImplementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
446448
testRuntime ('com.fasterxml.jackson.module:jackson-module-kotlin') {
447449
exclude group: 'org.jetbrains.kotlin'
448450
}
@@ -486,7 +488,6 @@ project('spring-integration-ftp') {
486488
api project(':spring-integration-file')
487489
api "commons-net:commons-net:$commonsNetVersion"
488490
api 'org.springframework:spring-context-support'
489-
optionalApi "javax.activation:javax.activation-api:$javaxActivationVersion"
490491
optionalApi "org.apache.ftpserver:ftpserver-core:$ftpServerVersion"
491492

492493
testImplementation project(':spring-integration-file').sourceSets.test.output
@@ -600,8 +601,6 @@ project('spring-integration-jpa') {
600601
}
601602
testImplementation "com.h2database:h2:$h2Version"
602603
testImplementation "org.hibernate:hibernate-entitymanager:$hibernateVersion"
603-
604-
// testRuntimeOnly "org.hibernate.javax.persistence:hibernate-jpa-2.1-api:$jpa21ApiVersion"
605604
}
606605
}
607606

@@ -630,8 +629,6 @@ project('spring-integration-mail') {
630629
providedImplementation "jakarta.mail:jakarta.mail-api:$mailVersion"
631630
providedImplementation "com.sun.mail:imap:$mailVersion"
632631
providedImplementation "com.sun.mail:jakarta.mail:$mailVersion"
633-
634-
optionalApi "javax.activation:javax.activation-api:$javaxActivationVersion"
635632
}
636633
}
637634

@@ -705,10 +702,10 @@ project('spring-integration-scripting') {
705702
optionalApi 'org.jetbrains.kotlin:kotlin-script-util'
706703
optionalApi 'org.jetbrains.kotlin:kotlin-compiler-embeddable'
707704

708-
testImplementation("org.jruby:jruby-complete:$jrubyVersion")
709-
testImplementation("org.codehaus.groovy:groovy:$groovyVersion")
710-
testImplementation("org.codehaus.groovy:groovy-jsr223:$groovyVersion")
711-
testImplementation("org.python:jython-standalone:$jythonVersion")
705+
testImplementation "org.jruby:jruby-complete:$jrubyVersion"
706+
testImplementation "org.codehaus.groovy:groovy:$groovyVersion"
707+
testImplementation "org.codehaus.groovy:groovy-jsr223:$groovyVersion"
708+
testImplementation "org.python:jython-standalone:$jythonVersion"
712709

713710
testRuntimeOnly 'org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable'
714711
}
@@ -734,7 +731,6 @@ project('spring-integration-sftp') {
734731
api project(':spring-integration-file')
735732
api "com.jcraft:jsch:$jschVersion"
736733
api 'org.springframework:spring-context-support'
737-
// optionalApi "javax.activation:javax.activation-api:$javaxActivationVersion"
738734
optionalApi "org.apache.sshd:sshd-sftp:$apacheSshdVersion"
739735

740736
testImplementation "org.apache.sshd:sshd-core:$apacheSshdVersion"
@@ -834,7 +830,7 @@ project('spring-integration-ws') {
834830
testImplementation ("org.springframework.ws:spring-ws-support:$springWsVersion") {
835831
exclude group: 'org.springframework'
836832
}
837-
testImplementation ('org.springframework:spring-jms')
833+
testImplementation 'org.springframework:spring-jms'
838834
testImplementation "javax.jms:javax.jms-api:$jmsApiVersion"
839835
testImplementation "org.igniterealtime.smack:smack-tcp:$smackVersion"
840836
testImplementation "org.igniterealtime.smack:smack-extensions:$smackVersion"
@@ -898,7 +894,7 @@ project('spring-integration-zookeeper') {
898894
}
899895

900896
project('spring-integration-bom') {
901-
description = "Spring Integration (Bill of Materials)"
897+
description = 'Spring Integration (Bill of Materials)'
902898

903899
apply plugin: 'java-platform'
904900
apply from: "${rootDir}/gradle/publish-maven.gradle"
@@ -972,7 +968,7 @@ dokka {
972968
moduleName = 'spring-integration'
973969
externalDocumentationLink {
974970
url = new URL("https://docs.spring.io/spring-integration/docs/$version/api/")
975-
packageListUrl = new File(buildDir, "api/element-list").toURI().toURL()
971+
packageListUrl = new File(buildDir, 'api/element-list').toURI().toURL()
976972
}
977973
externalDocumentationLink {
978974
url = new URL('https://docs.spring.io/spring-framework/docs/current/javadoc-api/')
@@ -999,7 +995,7 @@ task schemaZip(type: Zip) {
999995
javaProjects.each { subproject ->
1000996
Properties schemas = new Properties();
1001997
def shortName = subproject.name.replaceFirst("${rootProject.name}-", '')
1002-
if (subproject.name.endsWith("-core")) {
998+
if (subproject.name.endsWith('-core')) {
1003999
shortName = ''
10041000
}
10051001

@@ -1042,12 +1038,12 @@ task docsZip(type: Zip, dependsOn: reference) {
10421038
}
10431039

10441040
from ('build/docs/asciidocPdf') {
1045-
include "index-single.pdf"
1041+
include 'index-single.pdf'
10461042
rename 'index-single.pdf', 'spring-integration-reference.pdf'
10471043
into 'reference/pdf'
10481044
}
10491045
from (dokka) {
1050-
into "kdoc-api"
1046+
into 'kdoc-api'
10511047
}
10521048
}
10531049

@@ -1063,7 +1059,7 @@ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
10631059
include 'readme.txt'
10641060
include 'notice.txt'
10651061
into "${baseDir}"
1066-
expand(copyright: new Date().format("yyyy"), version: project.version)
1062+
expand(copyright: new Date().format('yyyy'), version: project.version)
10671063
}
10681064

10691065
from("$project.rootDir") {

gradle/docs.gradle

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,19 @@ task checkAsciidocLinks {
3838
matcher = (doc =~ /<<([^>]+)>>/)
3939
while (matcher.find()) {
4040
def anchor = matcher.group(1);
41-
def hasComma = anchor.contains(",")
42-
if (!anchor.startsWith("./")) {
41+
def hasComma = anchor.contains(',')
42+
if (!anchor.startsWith('./')) {
4343
if (hasComma) {
4444
anchor = anchor.substring(0, anchor.indexOf(","));
4545
}
4646
if (!anchors.contains(anchor)) {
47-
errors.add("\nAnchor '" + anchor
48-
+ "' not found in '" + file.name
49-
+ "', if in another file, it needs to be qualified with './fileName.adoc#'")
47+
errors.add("\nAnchor '$anchor' not found in '${file.name}', " +
48+
"if in another file, it needs to be qualified with './fileName.adoc#'")
5049
}
5150
}
5251
else {
5352
if (!hasComma) {
54-
errors.add("\nExternal anchor '" + anchor
55-
+ "' in '" + file.name
56-
+ "' should have a textual description (,...)")
53+
errors.add("\nExternal anchor '$anchor' in '${file.name}' should have a textual description (,...)")
5754
}
5855
}
5956
}

gradle/publish-maven.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ publishing {
3131
id = 'artembilan'
3232
name = 'Artem Bilan'
3333
34-
roles = ["project lead"]
34+
roles = ['project lead']
3535
}
3636
developer {
3737
id = 'garyrussell'
3838
name = 'Gary Russell'
3939
40-
roles = ["project lead emeritus"]
40+
roles = ['project lead emeritus']
4141
}
4242
developer {
4343
id = 'markfisher'
4444
name = 'Mark Fisher'
4545
46-
roles = ["project founder and lead emeritus"]
46+
roles = ['project founder and lead emeritus']
4747
}
4848
}
4949
issueManagement {

spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationProperties.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,16 @@
2525
* Utility class to encapsulate infrastructure Integration properties constants and their default values.
2626
* The default values can be overridden by the {@code META-INF/spring.integration.properties} with this entries
2727
* (includes their default values):
28-
* <p>
2928
* <ul>
30-
* <li> {@code spring.integration.channels.autoCreate=true}
31-
* <li> {@code spring.integration.channels.maxUnicastSubscribers=0x7fffffff}
32-
* <li> {@code spring.integration.channels.maxBroadcastSubscribers=0x7fffffff}
33-
* <li> {@code spring.integration.taskScheduler.poolSize=10}
34-
* <li> {@code spring.integration.messagingTemplate.throwExceptionOnLateReply=false}
35-
* <li> {@code spring.integration.readOnly.headers=}
36-
* <li> {@code spring.integration.endpoints.noAutoStartup=}
37-
* <li> {@code spring.integration.channels.error.requireSubscribers=true}
38-
* <li> {@code spring.integration.channels.error.ignoreFailures=true}
29+
* <li> {@code spring.integration.channels.autoCreate=true}
30+
* <li> {@code spring.integration.channels.maxUnicastSubscribers=0x7fffffff}
31+
* <li> {@code spring.integration.channels.maxBroadcastSubscribers=0x7fffffff}
32+
* <li> {@code spring.integration.taskScheduler.poolSize=10}
33+
* <li> {@code spring.integration.messagingTemplate.throwExceptionOnLateReply=false}
34+
* <li> {@code spring.integration.readOnly.headers=}
35+
* <li> {@code spring.integration.endpoints.noAutoStartup=}
36+
* <li> {@code spring.integration.channels.error.requireSubscribers=true}
37+
* <li> {@code spring.integration.channels.error.ignoreFailures=true}
3938
* </ul>
4039
*
4140
* @author Artem Bilan
@@ -298,6 +297,7 @@ public Properties toProperties() {
298297

299298
/**
300299
* Parse a provided {@link Properties} and build an {@link IntegrationProperties} instance.
300+
* @param properties the {@link Properties} to parse entries for {@link IntegrationProperties}.
301301
* @return {@link IntegrationProperties} based on the provided {@link Properties}.
302302
* @since 5.5
303303
*/

spring-integration-test/src/main/java/org/springframework/integration/test/context/MockIntegrationContext.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2020 the original author or authors.
2+
* Copyright 2017-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -79,7 +79,7 @@ public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
7979

8080
/**
8181
* Reinstate the mocked beans after execution test to their real state.
82-
* Typically is used from the {@link org.junit.After} method.
82+
* Typically is used from JUnit clean up method.
8383
* @param beanNames the bean names to reset.
8484
* If {@code null}, all the mocked beans are reset
8585
*/
@@ -213,6 +213,7 @@ public void substituteMessageHandlerFor(String consumerEndpointId, // NOSONAR -
213213

214214
private void substituteMessageSourceFor(String endpointId, Object messagingComponent, Class<?> endpointClass,
215215
String property, boolean autoStartup) {
216+
216217
Object endpoint = this.beanFactory.getBean(endpointId, endpointClass);
217218
if (autoStartup && endpoint instanceof Lifecycle) {
218219
((Lifecycle) endpoint).stop();

0 commit comments

Comments
 (0)