Skip to content

Commit b931112

Browse files
artembilangaryrussell
authored andcommitted
Upgrades to the latest dependencies and fixes
* Spring AMQP 2.1 B-S and fix imports for moved classes * Reactor GA * SF-5.1 B-S and exclude `org.springframework` from all the Spring Security dependencies * the latest Hibernate and JPA and fix the test query for the appropriate actual syntax * latest SSHD and add required dependency for `sshd-sftp` * latest Groovy and extra dependency for the `groovy-dateutil` * latest Smack for XMPP and appropriate code fixes for compatibility * Fix `StompIntegrationTests` to use `AFTER_EACH_TEST_METHOD`: when session is disconnected on the server, we can't interact with it anymore
1 parent 8582d40 commit b931112

File tree

13 files changed

+87
-87
lines changed

13 files changed

+87
-87
lines changed

build.gradle

Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ subprojects { subproject ->
8585

8686
ext {
8787
activeMqVersion = '5.15.3'
88-
apacheSshdVersion = '1.7.0'
89-
aspectjVersion = '1.9.0'
90-
assertjVersion = '3.9.1'
88+
apacheSshdVersion = '2.0.0'
89+
aspectjVersion = '1.9.1'
90+
assertjVersion = '3.11.1'
9191
assertkVersion = '0.12'
9292
boonVersion = '0.34'
9393
commonsDbcp2Version = '2.2.0'
@@ -98,49 +98,49 @@ subprojects { subproject ->
9898
eclipseLinkVersion = '2.7.1'
9999
ftpServerVersion = '1.1.1'
100100
googleJsr305Version = '3.0.2'
101-
groovyVersion = '2.4.15'
102-
guavaVersion = '20.0'
101+
groovyVersion = '2.5.2'
102+
guavaVersion = '26.0-jre'
103103
hamcrestVersion = '1.3'
104-
hazelcastVersion = '3.8'
105-
hibernateVersion = '5.2.16.Final'
104+
hazelcastVersion = '3.10.5'
105+
hibernateVersion = '5.3.6.Final'
106106
hsqldbVersion = '2.4.0'
107107
h2Version = '1.4.197'
108-
jackson2Version = '2.9.5'
108+
jackson2Version = '2.9.6'
109109
javaxActivationVersion = '1.1.1'
110-
javaxMailVersion = '1.6.1'
110+
javaxMailVersion = '1.6.2'
111111
jmsApiVersion = '2.0.1'
112112
jpa21ApiVersion = '1.0.0.Final'
113-
jpaApiVersion = '2.1.1'
113+
jpaApiVersion = '2.2.1'
114114
jrubyVersion = '9.1.16.0'
115115
jschVersion = '0.1.54'
116116
jsonpathVersion = '2.4.0'
117117
junit4Version = '4.12'
118-
junitJupiterVersion = '5.1.1'
119-
junitPlatformVersion = '1.1.1'
118+
junitJupiterVersion = '5.3.1'
119+
junitPlatformVersion = '1.3.1'
120120
jythonVersion = '2.5.3'
121121
kryoShadedVersion = '3.0.3'
122-
lettuceVersion = '5.0.3.RELEASE'
123-
log4jVersion = '2.11.0'
122+
lettuceVersion = '5.1.0.RELEASE'
123+
log4jVersion = '2.11.1'
124124
micrometerVersion = '1.0.6'
125-
mockitoVersion = '2.18.0'
125+
mockitoVersion = '2.22.0'
126126
mysqlVersion = '8.0.11'
127127
pahoMqttClientVersion = '1.2.0'
128128
postgresVersion = '42.0.0'
129-
reactorNettyVersion = '0.8.0.M2'
130-
reactorVersion = '3.2.0.M4'
129+
reactorNettyVersion = '0.8.0.RELEASE'
130+
reactorVersion = '3.2.0.RELEASE'
131131
romeToolsVersion = '1.9.0'
132132
servletApiVersion = '4.0.0'
133-
smackVersion = '4.2.3'
134-
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.1.0.M2'
135-
springDataJpaVersion = '2.1.0.RC2'
136-
springDataMongoVersion = '2.1.0.RC2'
137-
springDataRedisVersion = '2.1.0.RC2'
138-
springGemfireVersion = '2.1.0.RC2'
139-
springSecurityVersion = '5.1.0.RC1'
133+
smackVersion = '4.3.0'
134+
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '2.1.0.BUILD-SNAPSHOT'
135+
springDataJpaVersion = '2.1.0.BUILD-SNAPSHOT'
136+
springDataMongoVersion = '2.1.0.BUILD-SNAPSHOT'
137+
springDataRedisVersion = '2.1.0.BUILD-SNAPSHOT'
138+
springGemfireVersion = '2.1.0.BUILD-SNAPSHOT'
139+
springSecurityVersion = '5.1.0.BUILD-SNAPSHOT'
140140
springRetryVersion = '1.2.2.RELEASE'
141-
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.1.0.RC2'
142-
springWsVersion = '3.0.2.RELEASE'
143-
tomcatVersion = "9.0.7"
141+
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.1.0.BUILD-SNAPSHOT'
142+
springWsVersion = '3.0.3.RELEASE'
143+
tomcatVersion = "9.0.12"
144144
xmlUnitVersion = '1.6'
145145
xstreamVersion = '1.4.10'
146146
}
@@ -152,7 +152,7 @@ subprojects { subproject ->
152152
}
153153

154154
jacoco {
155-
toolVersion = "0.7.9"
155+
toolVersion = "0.8.2"
156156
}
157157

158158
// dependencies that are common across all java projects
@@ -411,6 +411,8 @@ project('spring-integration-groovy') {
411411
compile "org.springframework:spring-context-support:$springVersion"
412412

413413
testCompile "org.springframework:spring-web:$springVersion"
414+
415+
testRuntime "org.codehaus.groovy:groovy-dateutil:$groovyVersion"
414416
}
415417
}
416418

@@ -423,8 +425,12 @@ project('spring-integration-http') {
423425
compile ("com.rometools:rome:$romeToolsVersion", optional)
424426

425427
testCompile project(":spring-integration-security")
426-
testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion")
427-
testCompile ("org.springframework.security:spring-security-test:$springSecurityVersion")
428+
testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") {
429+
exclude group: 'org.springframework'
430+
}
431+
testCompile ("org.springframework.security:spring-security-test:$springSecurityVersion") {
432+
exclude group: 'org.springframework'
433+
}
428434
}
429435
}
430436

@@ -569,9 +575,13 @@ project('spring-integration-security') {
569575
description = 'Spring Integration Security Support'
570576
dependencies {
571577
compile project(":spring-integration-core")
572-
compile("org.springframework.security:spring-security-core:$springSecurityVersion")
578+
compile("org.springframework.security:spring-security-core:$springSecurityVersion") {
579+
exclude group: 'org.springframework'
580+
}
573581

574-
testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion")
582+
testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") {
583+
exclude group: 'org.springframework'
584+
}
575585
}
576586
}
577587

@@ -585,6 +595,7 @@ project('spring-integration-sftp') {
585595
compile("javax.activation:activation:$javaxActivationVersion", optional)
586596

587597
testCompile "org.apache.sshd:sshd-core:$apacheSshdVersion"
598+
testCompile "org.apache.sshd:sshd-sftp:$apacheSshdVersion"
588599
testCompile project(":spring-integration-file").sourceSets.test.output
589600
}
590601
}
@@ -637,8 +648,12 @@ project('spring-integration-webflux') {
637648
compile ("io.projectreactor.netty:reactor-netty:$reactorNettyVersion" , optional)
638649

639650
testCompile "org.springframework:spring-webmvc:$springVersion"
640-
testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion")
641-
testCompile ("org.springframework.security:spring-security-test:$springSecurityVersion")
651+
testCompile ("org.springframework.security:spring-security-config:$springSecurityVersion") {
652+
exclude group: 'org.springframework'
653+
}
654+
testCompile ("org.springframework.security:spring-security-test:$springSecurityVersion") {
655+
exclude group: 'org.springframework'
656+
}
642657
testCompile "io.projectreactor:reactor-test:$reactorVersion"
643658
}
644659
}

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/outbound/AbstractAmqpOutboundEndpoint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.springframework.amqp.core.MessageDeliveryMode;
2323
import org.springframework.amqp.rabbit.connection.Connection;
2424
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
25-
import org.springframework.amqp.rabbit.support.CorrelationData;
25+
import org.springframework.amqp.rabbit.connection.CorrelationData;
2626
import org.springframework.amqp.support.AmqpHeaders;
2727
import org.springframework.amqp.support.converter.MessageConverter;
2828
import org.springframework.beans.factory.BeanFactory;

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/outbound/AmqpOutboundEndpoint.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 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.
@@ -17,9 +17,9 @@
1717
package org.springframework.integration.amqp.outbound;
1818

1919
import org.springframework.amqp.core.AmqpTemplate;
20+
import org.springframework.amqp.rabbit.connection.CorrelationData;
2021
import org.springframework.amqp.rabbit.core.RabbitTemplate;
2122
import org.springframework.amqp.rabbit.core.RabbitTemplate.ReturnCallback;
22-
import org.springframework.amqp.rabbit.support.CorrelationData;
2323
import org.springframework.amqp.support.converter.MessageConverter;
2424
import org.springframework.context.Lifecycle;
2525
import org.springframework.integration.amqp.support.MappingUtils;

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/outbound/AsyncAmqpOutboundGateway.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2017 the original author or authors.
2+
* Copyright 2016-2018 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.
@@ -20,7 +20,7 @@
2020
import org.springframework.amqp.core.AmqpReplyTimeoutException;
2121
import org.springframework.amqp.rabbit.AsyncRabbitTemplate;
2222
import org.springframework.amqp.rabbit.AsyncRabbitTemplate.RabbitMessageFuture;
23-
import org.springframework.amqp.rabbit.support.CorrelationData;
23+
import org.springframework.amqp.rabbit.connection.CorrelationData;
2424
import org.springframework.amqp.support.converter.MessageConverter;
2525
import org.springframework.integration.amqp.support.MappingUtils;
2626
import org.springframework.integration.handler.ReplyRequiredException;

spring-integration-amqp/src/test/java/org/springframework/integration/amqp/config/AmqpOutboundChannelAdapterParserTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 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.
@@ -48,9 +48,9 @@
4848
import org.springframework.amqp.core.MessageProperties;
4949
import org.springframework.amqp.rabbit.connection.Connection;
5050
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
51+
import org.springframework.amqp.rabbit.connection.CorrelationData;
52+
import org.springframework.amqp.rabbit.connection.PublisherCallbackChannelImpl;
5153
import org.springframework.amqp.rabbit.core.RabbitTemplate;
52-
import org.springframework.amqp.rabbit.support.CorrelationData;
53-
import org.springframework.amqp.rabbit.support.PublisherCallbackChannelImpl;
5454
import org.springframework.amqp.support.AmqpHeaders;
5555
import org.springframework.beans.BeansException;
5656
import org.springframework.beans.DirectFieldAccessor;

spring-integration-amqp/src/test/java/org/springframework/integration/amqp/outbound/OutboundEndpointTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 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.
@@ -39,9 +39,9 @@
3939
import org.springframework.amqp.core.Message;
4040
import org.springframework.amqp.rabbit.AsyncRabbitTemplate;
4141
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
42+
import org.springframework.amqp.rabbit.connection.CorrelationData;
4243
import org.springframework.amqp.rabbit.core.RabbitTemplate;
4344
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
44-
import org.springframework.amqp.rabbit.support.CorrelationData;
4545
import org.springframework.beans.factory.BeanFactory;
4646
import org.springframework.integration.amqp.support.DefaultAmqpHeaderMapper;
4747
import org.springframework.integration.channel.NullChannel;

spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayTests-context.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
<bean class="org.springframework.integration.jpa.core.JpaExecutor">
186186
<constructor-arg name="entityManager" ref="entityManager"/>
187187
<property name="entityClass" value="org.springframework.integration.jpa.test.entity.StudentDomain"/>
188-
<property name="jpaQuery" value="from Student s where s.firstName = ? and s.lastName=?"/>
188+
<property name="jpaQuery" value="from Student s where s.firstName = ?0 and s.lastName = ?1"/>
189189
<property name="expectSingleResult" value="true"/>
190190
<property name="jpaParameters" >
191191
<util:list>

spring-integration-sftp/src/test/java/org/springframework/integration/sftp/SftpTestSupport.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2017 the original author or authors.
2+
* Copyright 2016-2018 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.
@@ -19,9 +19,7 @@
1919
import java.io.File;
2020
import java.util.Collections;
2121

22-
import org.apache.sshd.common.NamedFactory;
2322
import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory;
24-
import org.apache.sshd.server.Command;
2523
import org.apache.sshd.server.SshServer;
2624
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider;
2725
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
@@ -62,7 +60,7 @@ public static void createServer() throws Exception {
6260
server.setPasswordAuthenticator((username, password, session) -> true);
6361
server.setPort(0);
6462
server.setKeyPairProvider(new SimpleGeneratorHostKeyProvider(new File("hostkey.ser")));
65-
server.setSubsystemFactories(Collections.<NamedFactory<Command>>singletonList(new SftpSubsystemFactory()));
63+
server.setSubsystemFactories(Collections.singletonList(new SftpSubsystemFactory()));
6664
server.setFileSystemFactory(new VirtualFileSystemFactory(remoteTemporaryFolder.getRoot().toPath()));
6765
server.start();
6866
port = server.getPort();

spring-integration-sftp/src/test/java/org/springframework/integration/sftp/session/SftpServerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535
import org.apache.sshd.common.NamedFactory;
3636
import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory;
37-
import org.apache.sshd.server.Command;
3837
import org.apache.sshd.server.SshServer;
38+
import org.apache.sshd.server.command.Command;
3939
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider;
4040
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
4141
import org.junit.Test;
@@ -104,7 +104,7 @@ private void testKeyExchange(String pubKey, String privKey, String passphrase)
104104
server.setPublickeyAuthenticator((username, key, session) -> key.equals(allowedKey));
105105
server.setPort(0);
106106
server.setKeyPairProvider(new SimpleGeneratorHostKeyProvider(new File("hostkey.ser")));
107-
server.setSubsystemFactories(Collections.<NamedFactory<Command>>singletonList(new SftpSubsystemFactory()));
107+
server.setSubsystemFactories(Collections.singletonList(new SftpSubsystemFactory()));
108108
final String pathname = System.getProperty("java.io.tmpdir") + File.separator + "sftptest" + File.separator;
109109
new File(pathname).mkdirs();
110110
server.setFileSystemFactory(new VirtualFileSystemFactory(Paths.get(pathname)));

spring-integration-sftp/src/test/java/org/springframework/integration/sftp/session/SftpSessionFactoryTests.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2017 the original author or authors.
2+
* Copyright 2014-2018 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.
@@ -33,8 +33,6 @@
3333
import java.net.ConnectException;
3434
import java.util.Collections;
3535

36-
import org.apache.sshd.common.NamedFactory;
37-
import org.apache.sshd.server.Command;
3836
import org.apache.sshd.server.SshServer;
3937
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider;
4038
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
@@ -135,7 +133,8 @@ public void testPasswordPassPhraseViaUserInfo() throws Exception {
135133
fail("expected Exception");
136134
}
137135
catch (IllegalStateException e) {
138-
assertThat(e.getMessage(), startsWith("When a 'UserInfo' is provided, 'privateKeyPassphrase' is not allowed"));
136+
assertThat(e
137+
.getMessage(), startsWith("When a 'UserInfo' is provided, 'privateKeyPassphrase' is not allowed"));
139138
}
140139
f.setUserInfo(null);
141140
assertEquals("foo", userInfo.getPassword());
@@ -213,7 +212,7 @@ public void testCustomUserInfoTrue() throws Exception {
213212
private DefaultSftpSessionFactory createServerAndClient(SshServer server) throws IOException {
214213
server.setPublickeyAuthenticator((username, key, session) -> true);
215214
server.setPort(0);
216-
server.setSubsystemFactories(Collections.<NamedFactory<Command>>singletonList(new SftpSubsystemFactory()));
215+
server.setSubsystemFactories(Collections.singletonList(new SftpSubsystemFactory()));
217216
server.setKeyPairProvider(new SimpleGeneratorHostKeyProvider(new File("hostkey.ser")));
218217
server.start();
219218

0 commit comments

Comments
 (0)