Skip to content

Commit

Permalink
INT-3589: Upgrade Dependencies
Browse files Browse the repository at this point in the history
JIRA: https://jira.spring.io/browse/INT-3589, https://jira.spring.io/browse/INT-3624

* SF - 4.2. Fix Breaking changes for the `ApplicationEventPublisher`
* AMQP 1.5. Without issues
* Reactor - 2.0. Fix for the new `Stream` foundation
* jsonPath - 1.2.0. Fix for new `Predicate` abstraction. Add 'fail-fast error' to the `IntegrationRegistrar`
* Sshd - 0.13.0. Fix for new `VirtualFileSystemFactory` usage
* Spring Data - Fowler
* And others without issues
* Get rid of `reactor.util.StringUtils` usage

INT-3589: Address PR comments

Polishing
  • Loading branch information
artembilan authored and garyrussell committed Feb 17, 2015
1 parent b07686c commit f248394
Show file tree
Hide file tree
Showing 37 changed files with 312 additions and 245 deletions.
59 changes: 28 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ allprojects {

repositories {
if (version.endsWith('BUILD-SNAPSHOT') || project.hasProperty('platformVersion')) {
maven { url 'http://repo.spring.io/libs-snapshot' }
maven { url 'https://repo.spring.io/libs-snapshot' }
}
maven { url 'https://repo.spring.io/libs-milestone' }
maven { url 'https://repo.spring.io/plugins-release' }
mavenCentral()
}

Expand Down Expand Up @@ -76,59 +75,58 @@ subprojects { subproject ->


ext {
activeMqVersion = '5.10.0'
aspectjVersion = '1.8.2'
apacheSshdVersion = '0.10.1'
boonVersion = '0.25'
chronicleVersion = '3.2.2'
activeMqVersion = '5.11.0'
aspectjVersion = '1.8.4'
apacheSshdVersion = '0.13.0'
boonVersion = '0.31'
chronicleVersion = '3.3.4'
commonsDbcpVersion = '1.4'
commonsIoVersion = '2.4'
commonsNetVersion = '3.3'
derbyVersion = '10.10.2.0'
derbyVersion = '10.11.1.1'
eclipseLinkVersion = '2.4.2'
ftpServerVersion = '1.0.6'
groovyVersion = '2.3.6'
guavaVersion = '16.0.1'
groovyVersion = '2.4.0'
guavaVersion = '18.0'
hamcrestVersion = '1.3'
hibernateVersion = '4.3.6.Final'
hibernateVersion = '4.3.8.Final'
hsqldbVersion = '2.3.2'
h2Version = '1.4.180'
jackson2Version = '2.4.2'
jackson2Version = '2.5.1'
javaxActivationVersion = '1.1.1'
javaxMailVersion = '1.5.2'
jedisVersion = '2.5.2'
jettyVersion = '9.2.2.v20140723'
jedisVersion = '2.6.2'
jmsApiVersion = '1.1-rev-1'
jpaApiVersion = '2.0.0'
jrubyVersion = '1.7.15'
jrubyVersion = '1.7.19'
jschVersion = '0.1.51'
jsonpathVersion = '0.9.1'
jsonpathVersion = '1.2.0'
junitVersion = '4.11'
jythonVersion = '2.5.3'
log4jVersion = '1.2.17'
mockitoVersion = '1.9.5'
mysqlVersion = '5.1.29'
mysqlVersion = '5.1.34'
openJpaVersion = '2.3.0'
pahoMqttClientVersion = '0.4.0'
postgresVersion = '9.1-901-1.jdbc4'
reactorVersion = '1.1.4.RELEASE'
reactorSpringVersion = '1.1.3.RELEASE'
reactorVersion = '2.0.0.RC1'
reactorSpringVersion = '2.0.0.M2'
romeToolsVersion = '1.5.0'
saajApiVersion = '1.3.5'
saajImplVersion = '1.3.23'
servletApiVersion = '3.1.0'
slf4jVersion = "1.7.6"
tomcatVersion = "7.0.55"
slf4jVersion = "1.7.8"
tomcatVersion = "8.0.18"
smack3Version = '3.2.1'
smackVersion = '4.0.0'
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '1.4.2.RELEASE'
springDataMongoVersion = '1.6.0.RELEASE'
springDataRedisVersion = '1.4.0.RELEASE'
springGemfireVersion = '1.5.0.RELEASE'
smackVersion = '4.0.6'
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '1.5.0.BUILD-SNAPSHOT'
springDataMongoVersion = '1.7.0.M1'
springDataRedisVersion = '1.5.0.M1'
springGemfireVersion = '1.6.0.M1'
springSecurityVersion = '3.2.5.RELEASE'
springSocialTwitterVersion = '1.1.0.RELEASE'
springRetryVersion = '1.1.1.RELEASE'
springVersion = project.hasProperty('springVersion') ? project.springVersion : '4.1.4.RELEASE'
springRetryVersion = '1.1.2.RELEASE'
springVersion = project.hasProperty('springVersion') ? project.springVersion : '4.2.0.BUILD-SNAPSHOT'
springWsVersion = '2.2.0.RELEASE'
xmlUnitVersion = '1.5'
xstreamVersion = '1.4.7'
Expand Down Expand Up @@ -259,16 +257,15 @@ project('spring-integration-core') {
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-messaging:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile ("org.springframework:spring-context-support:$springVersion", optional) // override the reactor version
compile "org.springframework.retry:spring-retry:$springRetryVersion"
compile "org.projectreactor:reactor-core:$reactorVersion"
compile("org.projectreactor.spring:reactor-spring-context:$reactorSpringVersion", optional)
compile ("io.projectreactor:reactor-core:$reactorVersion", optional)
compile("com.fasterxml.jackson.core:jackson-databind:$jackson2Version", optional)
compile("com.jayway.jsonpath:json-path:$jsonpathVersion", optional)
compile("io.fastjson:boon:$boonVersion", optional)

testCompile ("org.aspectj:aspectjweaver:$aspectjVersion")
testCompile ("net.openhft:chronicle:$chronicleVersion")
testCompile ("io.projectreactor.spring:reactor-spring-context:$reactorSpringVersion")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@
String mapper() default "";

/**
* Provide a reference to an {@link reactor.core.Environment}
* to use for any of the interface methods that have a {@link reactor.core.composable.Promise} return type.
* Provide a reference to an {@link reactor.Environment}
* to use for any of the interface methods that have a {@link reactor.rx.Promise} return type.
* This {@code reactor.core.Environment} will only be used for those async methods; the sync methods
* will be invoked in the caller's thread.
* <p> This attribute is required in case of {@link reactor.core.composable.Promise} usage.
* <p> This attribute is required in case of {@link reactor.rx.Promise} usage.
* @return the suggested reactor Environment bean name.
* @since 4.1
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
import org.springframework.jmx.export.annotation.ManagedResource;
import org.springframework.messaging.Message;
import org.springframework.messaging.PollableChannel;

import reactor.util.StringUtils;
import org.springframework.util.StringUtils;

/**
* A channel implementation that essentially behaves like "/dev/null".
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -216,10 +216,24 @@ private void registerBuiltInBeans(BeanDefinitionRegistry registry) {
jsonPathClass = ClassUtils.forName("com.jayway.jsonpath.JsonPath", this.classLoader);
}
catch (ClassNotFoundException e) {
logger.debug("SpEL function '#jsonPath' isn't registered: " +
logger.debug("The '#jsonPath' SpEL function cannot be registered: " +
"there is no jayway json-path.jar on the classpath.");
}

if (jsonPathClass != null) {
try {
ClassUtils.forName("com.jayway.jsonpath.Predicate", this.classLoader);
}
catch (ClassNotFoundException e) {
jsonPathClass = null;
logger.warn("The '#jsonPath' SpEL function cannot be registered. " +
"An old json-path.jar version is detected in the classpath." +
"At least 1.2.0 is required; see version information at: " +
"https://github.com/jayway/JsonPath/releases", e);

}
}

if (jsonPathClass != null) {
IntegrationConfigUtils.registerSpelFunctionBean(registry, jsonPathBeanName,
IntegrationConfigUtils.BASE_PACKAGE + ".json.JsonPathUtils", "evaluate");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils;

import reactor.core.Environment;
import reactor.core.composable.Promise;
import reactor.core.composable.spec.Promises;
import reactor.function.Functions;
import reactor.Environment;
import reactor.rx.Promise;
import reactor.rx.Promises;
import reactor.fn.Functions;

/**
* Generates a proxy for the provided service interface to enable interaction
Expand Down Expand Up @@ -358,9 +358,8 @@ else if (Future.class.isAssignableFrom(returnType)) {
if (this.reactorEnvironment == null) {
throw new IllegalStateException("'reactorEnvironment' is required in case of 'Promise' return type.");
}
return Promises.<Object>task(Functions.supplier(new AsyncInvocationTask(invocation)))
.env(this.reactorEnvironment)
.get();
return Promises.<Object>task(this.reactorEnvironment,
Functions.supplier(new AsyncInvocationTask(invocation)));
}
return this.doInvoke(invocation);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,8 +20,8 @@
import java.io.InputStream;
import java.net.URL;

import com.jayway.jsonpath.Filter;
import com.jayway.jsonpath.JsonPath;
import com.jayway.jsonpath.Predicate;

/**
* Utility class to {@link #evaluate} a jsonPath on the provided object.
Expand All @@ -33,21 +33,21 @@
*/
public final class JsonPathUtils {

public static <T> T evaluate(Object json, String jsonPath, Filter<?>... filters) throws Exception {
public static <T> T evaluate(Object json, String jsonPath, Predicate... predicates) throws Exception {
if (json instanceof String) {
return JsonPath.read((String) json, jsonPath, filters);
return JsonPath.read((String) json, jsonPath, predicates);
}
else if (json instanceof File) {
return JsonPath.read((File) json, jsonPath, filters);
return JsonPath.read((File) json, jsonPath, predicates);
}
else if (json instanceof URL) {
return JsonPath.read((URL) json, jsonPath, filters);
return JsonPath.read((URL) json, jsonPath, predicates);
}
else if (json instanceof InputStream) {
return JsonPath.read((InputStream) json, jsonPath, filters);
return JsonPath.read((InputStream) json, jsonPath, predicates);
}
else {
return JsonPath.read(json, jsonPath, filters);
return JsonPath.read(json, jsonPath, predicates);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;

import reactor.function.Function;
import reactor.fn.Function;

/**
* Base class for Message-splitting handlers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.Iterator;
import java.util.NoSuchElementException;

import reactor.function.Function;
import reactor.fn.Function;

/**
* An {@link Iterator} implementation to convert each item from the target
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -76,6 +76,12 @@ public void configureAggregator() {
public void publishEvent(ApplicationEvent event) {
expiryEvents.add((MessageGroupExpiredEvent) event);
}

@Override
public void publishEvent(Object event) {

}

});
this.aggregator.setBeanName("testAggregator");
this.aggregator.afterPropertiesSet();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,6 +28,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
Expand All @@ -37,9 +38,9 @@
import org.springframework.messaging.Message;
import org.springframework.messaging.support.GenericMessage;

import reactor.io.encoding.JavaSerializationCodec;
import reactor.queue.PersistentQueue;
import reactor.queue.spec.PersistentQueueSpec;
import reactor.io.codec.JavaSerializationCodec;
import reactor.io.queue.PersistentQueue;
import reactor.io.queue.spec.PersistentQueueSpec;

/**
* @author Mark Fisher
Expand Down Expand Up @@ -248,6 +249,7 @@ public void testPurge() {
public final TemporaryFolder tempFolder = new TemporaryFolder();

@Test
@Ignore //INT-3644
public void testReactorPersistentQueue() throws InterruptedException {
final AtomicBoolean messageReceived = new AtomicBoolean(false);
final CountDownLatch latch = new CountDownLatch(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@

<beans:bean id="testExecutor" class="org.springframework.integration.config.xml.GatewayParserTests$TestExecutor"/>

<beans:bean id="reactorEnvironment" class="reactor.core.Environment" destroy-method="shutdown"/>
<beans:bean id="reactorEnvironment" class="reactor.Environment" destroy-method="shutdown"/>

</beans:beans>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,7 +44,7 @@
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import reactor.core.composable.Promise;
import reactor.rx.Promise;

/**
* @author Mark Fisher
Expand Down
Loading

0 comments on commit f248394

Please sign in to comment.