Latest dependency updates (HttpClient 4.4, TestNG 6.8.21, SnakeYAML 1.15, FreeMarker 2.3.22, JRuby 1.7.19, JAMon 2.81, JiBX 1.2.6, XMLUnit 1.6, JsonPath 1.2)

This commit is contained in:
Juergen Hoeller 2015-03-02 20:00:17 +01:00
parent 4a46b60e2a
commit ee74fe6c27
5 changed files with 86 additions and 96 deletions

View File

@ -28,35 +28,41 @@ configure(allprojects) { project ->
version = qualifyVersionIfNecessary(version)
ext.aspectjVersion = "1.8.5"
ext.eclipseLinkVersion = "2.4.2"
ext.eclipselinkVersion = "2.4.2"
ext.ehcacheVersion = "2.9.1"
ext.ehcacheJCacheVersion = "1.0.1"
ext.ehcachejcacheVersion = "1.0.1"
ext.fileuploadVersion = "1.3.1"
ext.freemarkerVersion = "2.3.22"
ext.groovyVersion = "2.4.1"
ext.gsonVersion = "2.3.1"
ext.hibernate3Version = "3.6.10.Final"
ext.hibernate4Version = "4.3.8.Final"
ext.hibVal4Version = "4.3.2.Final"
ext.hibVal5Version = "5.1.3.Final"
ext.hibval4Version = "4.3.2.Final"
ext.hibval5Version = "5.1.3.Final"
ext.hsqldbVersion = "2.3.2"
ext.httpclientVersion = "4.4"
ext.httpasyncVersion = "4.0.2"
ext.jackson2Version = "2.5.1"
ext.jasperReportsVersion = "6.0.3"
ext.jasperreportsVersion = "6.0.3"
ext.jettyVersion = "9.2.9.v20150224"
ext.jodaVersion = "2.7"
ext.jtaVersion = "1.2"
ext.junitVersion = "4.12"
ext.nettyVersion = "4.0.25.Final"
ext.openJpaVersion = "2.2.2" // 2.3.0 not Java 8 compatible (based on ASM 4)
ext.openjpaVersion = "2.2.2" // 2.3.0 not Java 8 compatible (based on ASM 4)
ext.protobufVersion = "2.6.1"
ext.reactorVersion = "1.1.5.RELEASE"
ext.slf4jVersion = "1.7.10"
ext.snakeYamlVersion = "1.14"
ext.snakeyamlVersion = "1.15"
ext.snifferVersion = "1.14"
ext.testngVersion = "6.8.21"
ext.tiles2Version = "2.2.2"
ext.tiles3Version = "3.0.5"
ext.tomcatVersion = "8.0.20"
ext.tyrusVersion = "1.3.5" // constrained by WebLogic 12.1.3 support
ext.undertowVersion = "1.1.2.Final"
ext.woodstoxVersion = "4.4.1"
ext.xmlunitVersion = "1.6"
ext.xstreamVersion = "1.4.8"
ext.gradleScriptDir = "${rootProject.projectDir}/gradle"
@ -333,7 +339,7 @@ project("spring-core") {
optional("net.sf.jopt-simple:jopt-simple:4.8")
optional("log4j:log4j:1.2.17")
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
testCompile("xmlunit:xmlunit:1.5")
testCompile("xmlunit:xmlunit:${xmlunitVersion}")
testCompile("org.codehaus.woodstox:woodstox-core-asl:${woodstoxVersion}") {
exclude group: "stax", module: "stax-api"
}
@ -361,7 +367,7 @@ project("spring-beans") {
compile(files(project(":spring-core").cglibRepackJar))
optional("javax.inject:javax.inject:1")
optional("javax.el:javax.el-api:2.2.5")
optional("org.yaml:snakeyaml:${snakeYamlVersion}")
optional("org.yaml:snakeyaml:${snakeyamlVersion}")
testCompile("log4j:log4j:1.2.17")
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
}
@ -405,7 +411,7 @@ project("spring-aop") {
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
optional("commons-pool:commons-pool:1.6")
optional("org.apache.commons:commons-pool2:2.2")
optional("com.jamonapi:jamon:2.79")
optional("com.jamonapi:jamon:2.81")
}
}
@ -455,12 +461,12 @@ project("spring-context") {
optional("javax.enterprise.concurrent:javax.enterprise.concurrent-api:1.0")
optional("org.eclipse.persistence:javax.persistence:2.0.0")
optional("javax.validation:validation-api:1.0.0.GA")
optional("org.hibernate:hibernate-validator:${hibVal4Version}")
optional("org.hibernate:hibernate-validator:${hibval4Version}")
optional("joda-time:joda-time:${jodaVersion}")
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
optional("org.beanshell:bsh:2.0b4")
optional("org.jruby:jruby:1.7.17")
optional("org.jruby:jruby:1.7.19")
testCompile("javax.inject:javax.inject-tck:1")
testCompile("commons-dbcp:commons-dbcp:1.4")
testCompile("org.apache.commons:commons-pool2:2.2")
@ -550,9 +556,9 @@ project("spring-oxm") {
exclude group: 'xpp3', module: 'xpp3_min'
exclude group: 'xmlpull', module: 'xmlpull'
}
optional("org.jibx:jibx-run:1.2.5")
optional("org.jibx:jibx-run:1.2.6")
testCompile(project(":spring-context"))
testCompile("xmlunit:xmlunit:1.5")
testCompile("xmlunit:xmlunit:${xmlunitVersion}")
testCompile("xpp3:xpp3:1.1.4c")
testCompile("org.codehaus.jettison:jettison:1.3.7") {
exclude group: 'stax', module: 'stax-api'
@ -615,9 +621,9 @@ project("spring-context-support") {
optional("org.quartz-scheduler:quartz:2.2.1")
optional("org.codehaus.fabric3.api:commonj:1.1.0")
optional("org.apache.velocity:velocity:1.7")
optional("org.freemarker:freemarker:2.3.21")
optional("org.freemarker:freemarker:${freemarkerVersion}")
optional("com.lowagie:itext:2.1.7")
optional("net.sf.jasperreports:jasperreports:$jasperReportsVersion") {
optional("net.sf.jasperreports:jasperreports:$jasperreportsVersion") {
exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations"
exclude group: "com.fasterxml.jackson.core", module: "jackson-core"
exclude group: "com.fasterxml.jackson.core", module: "jackson-databind"
@ -631,7 +637,7 @@ project("spring-context-support") {
testCompile("commons-digester:commons-digester:1.8.1") // for Velocity/JasperReports
testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
testCompile("org.ehcache:jcache:${ehcacheJCacheVersion}")
testCompile("org.ehcache:jcache:${ehcachejcacheVersion}")
testRuntime("com.sun.mail:javax.mail:1.5.2")
}
}
@ -669,9 +675,9 @@ project("spring-web") {
optional("aopalliance:aopalliance:1.0")
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
optional("com.caucho:hessian:4.0.38")
optional("commons-fileupload:commons-fileupload:1.3.1")
optional("org.apache.httpcomponents:httpclient:4.3.6")
optional("org.apache.httpcomponents:httpasyncclient:4.0.2")
optional("commons-fileupload:commons-fileupload:${fileuploadVersion}")
optional("org.apache.httpcomponents:httpclient:${httpclientVersion}")
optional("org.apache.httpcomponents:httpasyncclient:${httpasyncVersion}")
optional("io.netty:netty-all:${nettyVersion}")
optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
optional("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson2Version}")
@ -688,7 +694,7 @@ project("spring-web") {
optional("com.google.protobuf:protobuf-java:${protobufVersion}")
optional("javax.mail:javax.mail-api:1.5.2")
testCompile(project(":spring-context-support")) // for JafMediaTypeFactory
testCompile("xmlunit:xmlunit:1.5")
testCompile("xmlunit:xmlunit:${xmlunitVersion}")
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
testCompile("org.apache.taglibs:taglibs-standard-jstlel:1.2.1") {
exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
@ -757,8 +763,8 @@ project("spring-orm") {
optional(project(":spring-web"))
optional("aopalliance:aopalliance:1.0")
optional("org.eclipse.persistence:javax.persistence:2.0.5")
optional("org.eclipse.persistence:org.eclipse.persistence.core:${eclipseLinkVersion}")
optional("org.eclipse.persistence:org.eclipse.persistence.jpa:${eclipseLinkVersion}") {
optional("org.eclipse.persistence:org.eclipse.persistence.core:${eclipselinkVersion}")
optional("org.eclipse.persistence:org.eclipse.persistence.jpa:${eclipselinkVersion}") {
exclude group: 'org.eclipse.persistence', module: 'javax.persistence'
}
optional("org.hibernate:hibernate-core:${hibernate3Version}") {
@ -768,7 +774,7 @@ project("spring-orm") {
optional("org.hibernate:hibernate-entitymanager:${hibernate3Version}") {
exclude group: 'org.hibernate.javax.persistence', module: 'hibernate-jpa-2.0-api'
}
optional("org.apache.openjpa:openjpa:${openJpaVersion}") {
optional("org.apache.openjpa:openjpa:${openjpaVersion}") {
exclude group: 'junit', module: 'junit'
exclude group: 'org.apache.geronimo.specs', module: 'geronimo-jpa_2.0_spec'
exclude group: 'org.apache.geronimo.specs', module: 'geronimo-jta_1.1_spec'
@ -798,7 +804,7 @@ project("spring-orm-hibernate4") {
optional("javax.servlet:javax.servlet-api:3.0.1")
optional("aopalliance:aopalliance:1.0")
testCompile("javax.validation:validation-api:1.1.0.GA")
testCompile("org.hibernate:hibernate-validator:${hibVal5Version}")
testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
testCompile("javax.el:javax.el-api:2.2.5")
testCompile("org.glassfish.web:javax.el:2.2.6")
}
@ -823,10 +829,10 @@ project("spring-webmvc") {
optional("org.apache.poi:poi:3.11")
optional("org.apache.velocity:velocity:1.7")
optional("velocity-tools:velocity-tools-view:1.4")
optional("org.freemarker:freemarker:2.3.21")
optional("org.freemarker:freemarker:${freemarkerVersion}")
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
optional("com.lowagie:itext:2.1.7")
optional("net.sf.jasperreports:jasperreports:$jasperReportsVersion") {
optional("net.sf.jasperreports:jasperreports:$jasperreportsVersion") {
exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations"
exclude group: "com.fasterxml.jackson.core", module: "jackson-core"
exclude group: "com.fasterxml.jackson.core", module: "jackson-databind"
@ -857,7 +863,7 @@ project("spring-webmvc") {
}
testCompile(project(":spring-aop"))
testCompile("rhino:js:1.7R1")
testCompile("xmlunit:xmlunit:1.5")
testCompile("xmlunit:xmlunit:${xmlunitVersion}")
testCompile("dom4j:dom4j:1.6.1") {
exclude group: "xml-apis", module: "xml-apis"
}
@ -873,9 +879,9 @@ project("spring-webmvc") {
exclude group: "javax.servlet", module: "javax.servlet"
}
testCompile("javax.validation:validation-api:1.0.0.GA")
testCompile("org.hibernate:hibernate-validator:${hibVal4Version}")
testCompile("org.apache.httpcomponents:httpclient:4.3.6")
testCompile("commons-fileupload:commons-fileupload:1.3.1")
testCompile("org.hibernate:hibernate-validator:${hibval4Version}")
testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}")
testCompile("commons-fileupload:commons-fileupload:${fileuploadVersion}")
testCompile("commons-io:commons-io:1.3")
testCompile("joda-time:joda-time:${jodaVersion}")
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
@ -925,7 +931,7 @@ project("spring-webmvc-portlet") {
compile(project(":spring-webmvc"))
provided("javax.servlet:javax.servlet-api:3.0.1")
provided("javax.portlet:portlet-api:2.0")
optional("commons-fileupload:commons-fileupload:1.3.1")
optional("commons-fileupload:commons-fileupload:${fileuploadVersion}")
}
}
@ -943,7 +949,7 @@ project("spring-test") {
optional(project(":spring-webmvc"))
optional(project(":spring-webmvc-portlet"))
optional("junit:junit:${junitVersion}")
optional("org.testng:testng:6.8.8")
optional("org.testng:testng:${testngVersion}")
optional("javax.inject:javax.inject:1")
optional("javax.servlet:javax.servlet-api:3.0.1")
optional("javax.servlet.jsp:javax.servlet.jsp-api:2.2.1")
@ -956,16 +962,16 @@ project("spring-test") {
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
optional("org.hamcrest:hamcrest-core:1.3")
optional("com.jayway.jsonpath:json-path:1.1.0")
optional("com.jayway.jsonpath:json-path:1.2.0")
optional("org.skyscreamer:jsonassert:1.2.3")
optional("xmlunit:xmlunit:1.5")
optional("xmlunit:xmlunit:${xmlunitVersion}")
testCompile(project(":spring-context-support"))
testCompile(project(":spring-oxm"))
testCompile("javax.mail:javax.mail-api:1.5.2")
testCompile("javax.ejb:ejb-api:3.0")
testCompile("org.hibernate:hibernate-core:${hibernate4Version}")
testCompile("org.hibernate:hibernate-entitymanager:${hibernate4Version}")
testCompile("org.hibernate:hibernate-validator:${hibVal5Version}")
testCompile("org.hibernate:hibernate-validator:${hibval5Version}")
testCompile("com.thoughtworks.xstream:xstream:${xstreamVersion}")
testCompile("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
testCompile("com.rometools:rome:1.5.0")

View File

@ -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.
@ -32,50 +32,55 @@ import static org.mockito.BDDMockito.*;
*/
public class JamonPerformanceMonitorInterceptorTests {
private JamonPerformanceMonitorInterceptor interceptor = new JamonPerformanceMonitorInterceptor();
private final JamonPerformanceMonitorInterceptor interceptor = new JamonPerformanceMonitorInterceptor();
private MethodInvocation mi = mock(MethodInvocation.class);
private final MethodInvocation mi = mock(MethodInvocation.class);
private Log log = mock(Log.class);
private final Log log = mock(Log.class);
@Before
public void setUp() {
MonitorFactory.reset();
}
@Before
public void setUp() {
MonitorFactory.reset();
}
@After
public void tearDown() {
MonitorFactory.reset();
}
@After
public void tearDown() {
MonitorFactory.reset();
}
@Test
public void testInvokeUnderTraceWithNormalProcessing() throws Throwable {
given(mi.getMethod()).willReturn(String.class.getMethod("toString"));
@Test
public void testInvokeUnderTraceWithNormalProcessing() throws Throwable {
given(mi.getMethod()).willReturn(String.class.getMethod("toString"));
interceptor.invokeUnderTrace(mi, log);
interceptor.invokeUnderTrace(mi, log);
assertEquals("jamon must track the method being invoked", 1, MonitorFactory.getNumRows());
assertTrue("The jamon report must contain the toString method that was invoked", MonitorFactory.getReport().contains("toString"));
}
assertTrue("jamon must track the method being invoked", MonitorFactory.getNumRows() > 0);
assertTrue("The jamon report must contain the toString method that was invoked",
MonitorFactory.getReport().contains("toString"));
}
@Test
public void testInvokeUnderTraceWithExceptionTracking() throws Throwable {
given(mi.getMethod()).willReturn(String.class.getMethod("toString"));
given(mi.proceed()).willThrow(new IllegalArgumentException());
@Test
public void testInvokeUnderTraceWithExceptionTracking() throws Throwable {
given(mi.getMethod()).willReturn(String.class.getMethod("toString"));
given(mi.proceed()).willThrow(new IllegalArgumentException());
try {
interceptor.invokeUnderTrace(mi, log);
fail("Must have propagated the IllegalArgumentException");
}
try {
interceptor.invokeUnderTrace(mi, log);
fail("Must have propagated the IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
}
assertEquals("Monitors must exist for the method invocation and 2 exceptions", 3, MonitorFactory.getNumRows());
assertTrue("The jamon report must contain the toString method that was invoked", MonitorFactory.getReport().contains("toString"));
assertTrue("The jamon report must contain the generic exception: " + MonitorFactory.EXCEPTIONS_LABEL, MonitorFactory.getReport().contains(MonitorFactory.EXCEPTIONS_LABEL));
assertTrue("The jamon report must contain the specific exception: IllegalArgumentException'", MonitorFactory.getReport().contains("IllegalArgumentException"));
}
assertEquals("Monitors must exist for the method invocation and 2 exceptions",
3, MonitorFactory.getNumRows());
assertTrue("The jamon report must contain the toString method that was invoked",
MonitorFactory.getReport().contains("toString"));
assertTrue("The jamon report must contain the generic exception: " + MonitorFactory.EXCEPTIONS_LABEL,
MonitorFactory.getReport().contains(MonitorFactory.EXCEPTIONS_LABEL));
assertTrue("The jamon report must contain the specific exception: IllegalArgumentException'",
MonitorFactory.getReport().contains("IllegalArgumentException"));
}
}

View File

@ -9,7 +9,7 @@ dependencies {
castor "velocity:velocity:1.5"
xjc "com.sun.xml.bind:jaxb-xjc:2.1.7"
xmlbeans "org.apache.xmlbeans:xmlbeans:2.6.0"
jibx "org.jibx:jibx-bind:1.2.5"
jibx "org.jibx:jibx-bind:1.2.6"
jibx "bcel:bcel:5.1"
}

View File

@ -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.
@ -32,6 +32,9 @@ import org.springframework.http.HttpMethod;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
/**
* @author Stephane Nicoll
*/
public class HttpComponentsClientHttpRequestFactoryTests extends AbstractHttpRequestFactoryTestCase {
@Override
@ -81,19 +84,6 @@ public class HttpComponentsClientHttpRequestFactoryTests extends AbstractHttpReq
assertEquals("Wrong custom socket timeout", 4567, requestConfig.getSocketTimeout());
}
@Test
public void customHttpClientUsesItsDefault() throws Exception {
HttpComponentsClientHttpRequestFactory hrf =
new HttpComponentsClientHttpRequestFactory(HttpClientBuilder.create().build());
URI uri = new URI(baseUrl + "/status/ok");
HttpComponentsClientHttpRequest request = (HttpComponentsClientHttpRequest)
hrf.createRequest(uri, HttpMethod.GET);
assertNull("No custom config should be set with a custom HttpClient",
request.getHttpContext().getAttribute(HttpClientContext.REQUEST_CONFIG));
}
@Test
public void defaultSettingsOfHttpClientMergedOnExecutorCustomization() throws Exception {
RequestConfig defaultConfig = RequestConfig.custom().setConnectTimeout(1234).build();

View File

@ -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.
@ -30,7 +30,6 @@ import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
/**
*
* @author Stephane Nicoll
*/
public class HttpComponentsHttpInvokerRequestExecutorTests {
@ -80,16 +79,6 @@ public class HttpComponentsHttpInvokerRequestExecutorTests {
assertEquals(10000, httpPost.getConfig().getSocketTimeout());
}
@Test
public void customHttpClientUsesItsDefault() throws IOException {
HttpComponentsHttpInvokerRequestExecutor executor =
new HttpComponentsHttpInvokerRequestExecutor(HttpClientBuilder.create().build());
HttpInvokerClientConfiguration config = mockHttpInvokerClientConfiguration("http://fake-service");
HttpPost httpPost = executor.createHttpPost(config);
assertNull("No custom config should be set with a custom HttpClient", httpPost.getConfig());
}
@Test
public void defaultSettingsOfHttpClientMergedOnExecutorCustomization() throws IOException {
RequestConfig defaultConfig = RequestConfig.custom().setConnectTimeout(1234).build();