From fa2c377405ea9b65c0624bf706a4a5b71a6d77ba Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 8 Sep 2017 19:41:27 +0200 Subject: [PATCH] Downgrade to AspectJ 1.8.9 and merge EhCache 3 tests into spring-context-support Includes latest applicable updates (Jackson 2.8.10, OkHttp 3.8.1, Undertow 1.3.31, Netty 4.1.15) Issue: SPR-15836 Issue: SPR-15880 --- build.gradle | 14 +++++++------- .../jcache/JCacheEhCache3AnnotationTests.java | 2 +- .../cache/jcache/JCacheEhCache3ApiTests.java | 2 +- .../cache/jcache/JCacheEhCacheAnnotationTests.java | 10 +++++----- .../cache/jcache/JCacheEhCacheApiTests.java | 5 ++--- 5 files changed, 16 insertions(+), 17 deletions(-) rename {spring-test => spring-context-support}/src/test/java/org/springframework/cache/jcache/JCacheEhCache3AnnotationTests.java (95%) rename {spring-test => spring-context-support}/src/test/java/org/springframework/cache/jcache/JCacheEhCache3ApiTests.java (95%) diff --git a/build.gradle b/build.gradle index e39cf3516b2..451e46cd2a5 100644 --- a/build.gradle +++ b/build.gradle @@ -31,7 +31,7 @@ configure(allprojects) { project -> group = "org.springframework" version = qualifyVersionIfNecessary(version) - ext.aspectjVersion = "1.8.10" + ext.aspectjVersion = "1.8.9" ext.caffeineVersion = "2.3.5" ext.eclipselinkVersion = "2.4.2" ext.ehcacheVersion = "2.10.4" @@ -52,7 +52,7 @@ configure(allprojects) { project -> ext.hsqldbVersion = "2.3.4" ext.httpasyncVersion = "4.1.3" ext.httpclientVersion = "4.5.3" - ext.jackson2Version = "2.8.9" + ext.jackson2Version = "2.8.10" ext.jasperreportsVersion = "6.2.1" // our tests fail with JR-internal NPEs against 6.2.2 and higher ext.javamailVersion = "1.5.6" ext.jettyVersion = "9.3.14.v20161028" // as of 9.3.15, Jetty has hard Servlet 3.1 requirement @@ -62,9 +62,9 @@ configure(allprojects) { project -> ext.jtaVersion = "1.2" ext.junitVersion = "4.12" ext.log4jVersion = "1.2.17" - ext.nettyVersion = "4.1.13.Final" + ext.nettyVersion = "4.1.15.Final" ext.okhttpVersion = "2.7.5" - ext.okhttp3Version = "3.7.0" + ext.okhttp3Version = "3.8.1" ext.openjpaVersion = "2.4.1" ext.poiVersion = "3.14" ext.reactorVersion = "2.0.8.RELEASE" @@ -77,7 +77,7 @@ configure(allprojects) { project -> ext.tiles3Version = "3.0.7" ext.tomcatVersion = "8.5.16" ext.tyrusVersion = "1.3.5" // constrained by WebLogic 12.1.3 support - ext.undertowVersion = "1.3.30.Final" + ext.undertowVersion = "1.3.31.Final" ext.xmlunitVersion = "1.6" ext.xstreamVersion = "1.4.9" @@ -658,6 +658,8 @@ project("spring-context-support") { testCompile("org.slf4j:slf4j-api:${slf4jVersion}") testRuntime("com.sun.mail:javax.mail:${javamailVersion}") testRuntime("org.ehcache:jcache:${ehcachejcacheVersion}") + testRuntime("org.ehcache:ehcache:${ehcache3Version}") + testRuntime("org.terracotta:management-model:2.3.0") } } @@ -1034,8 +1036,6 @@ project("spring-test") { testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}") testCompile("javax.cache:cache-api:1.0.0") testRuntime("log4j:log4j:${log4jVersion}") - testRuntime("org.ehcache:ehcache:${ehcache3Version}") - testRuntime("org.terracotta:management-model:2.3.0") } task testNG(type: Test) { diff --git a/spring-test/src/test/java/org/springframework/cache/jcache/JCacheEhCache3AnnotationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCache3AnnotationTests.java similarity index 95% rename from spring-test/src/test/java/org/springframework/cache/jcache/JCacheEhCache3AnnotationTests.java rename to spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCache3AnnotationTests.java index 86f0f76d0e3..608eb7bc7cf 100644 --- a/spring-test/src/test/java/org/springframework/cache/jcache/JCacheEhCache3AnnotationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCache3AnnotationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2017 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. diff --git a/spring-test/src/test/java/org/springframework/cache/jcache/JCacheEhCache3ApiTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCache3ApiTests.java similarity index 95% rename from spring-test/src/test/java/org/springframework/cache/jcache/JCacheEhCache3ApiTests.java rename to spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCache3ApiTests.java index 0e724344f29..97e42e64697 100644 --- a/spring-test/src/test/java/org/springframework/cache/jcache/JCacheEhCache3ApiTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCache3ApiTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2017 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. diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java index 8b207f0262f..5e897570a5b 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2017 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. @@ -16,7 +16,6 @@ package org.springframework.cache.jcache; -import javax.annotation.Resource; import javax.cache.CacheManager; import javax.cache.Caching; import javax.cache.configuration.MutableConfiguration; @@ -26,6 +25,7 @@ import org.junit.After; import org.junit.Ignore; import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CachingConfigurerSupport; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.config.AbstractCacheAnnotationTests; @@ -59,7 +59,7 @@ public class JCacheEhCacheAnnotationTests extends AbstractCacheAnnotationTests { } protected CachingProvider getCachingProvider() { - return Caching.getCachingProvider(); + return Caching.getCachingProvider("org.ehcache.jcache.JCacheCachingProvider"); } @After @@ -81,7 +81,7 @@ public class JCacheEhCacheAnnotationTests extends AbstractCacheAnnotationTests { @EnableCaching static class EnableCachingConfig extends CachingConfigurerSupport { - @Resource + @Autowired CachingProvider cachingProvider; @Override @@ -93,7 +93,7 @@ public class JCacheEhCacheAnnotationTests extends AbstractCacheAnnotationTests { @Bean public CacheManager jCacheManager() { CacheManager cacheManager = this.cachingProvider.getCacheManager(); - MutableConfiguration mutableConfiguration = new MutableConfiguration(); + MutableConfiguration mutableConfiguration = new MutableConfiguration<>(); mutableConfiguration.setStoreByValue(false); // otherwise value has to be Serializable cacheManager.createCache("testCache", mutableConfiguration); cacheManager.createCache("primary", mutableConfiguration); diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java index bfb5bce39f7..ef79b6fc544 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2017 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. @@ -48,7 +48,7 @@ public class JCacheEhCacheApiTests extends AbstractCacheTests { } protected CachingProvider getCachingProvider() { - return Caching.getCachingProvider(); + return Caching.getCachingProvider("org.ehcache.jcache.JCacheCachingProvider"); } @After @@ -58,7 +58,6 @@ public class JCacheEhCacheApiTests extends AbstractCacheTests { } } - @Override protected JCacheCache getCache() { return this.cache;