diff --git a/build.gradle b/build.gradle index 0c83e830e7abb8388d2fd6a7722116022ca602c4..5655c2171aee8535e1510b088ee0934d83786708 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ ext { linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-framework.git' linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-framework.git' - moduleProjects = subprojects.findAll { + moduleProjects = subprojects.findAll { !it.name.equals('spring-build-src') && !it.name.equals('spring-framework-bom') } } @@ -141,7 +141,7 @@ configure(allprojects) { project -> testCompile("org.hamcrest:hamcrest-all:${hamcrestVersion}") sniffer("org.codehaus.mojo:animal-sniffer-ant-tasks:${snifferVersion}") - javaApiSignature("org.codehaus.mojo.signature:java16:1.1@signature") // as from JDK 6 update 18 + javaApiSignature("org.codehaus.mojo.signature:java16:1.1@signature") // API level from JDK 6 update 18 } task copyJavaApiSignature(type: Copy) { @@ -628,7 +628,7 @@ project("spring-jdbc") { optional("javax.transaction:javax.transaction-api:${jtaVersion}") optional("com.mchange:c3p0:0.9.5.1") optional("org.hsqldb:hsqldb:${hsqldbVersion}") - optional("com.h2database:h2:1.4.188") + optional("com.h2database:h2:1.4.189") optional("org.apache.derby:derby:10.11.1.1") optional("org.apache.derby:derbyclient:10.11.1.1") } @@ -937,7 +937,7 @@ project("spring-webmvc") { testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}") testCompile("org.jruby:jruby:${jrubyVersion}") testCompile("org.python:jython-standalone:2.5.3") - testCompile("org.webjars:underscorejs:1.8.2") + testCompile("org.webjars:underscorejs:1.8.3") } } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java index 20c3fad00d980bad8d272dde9acefe068c82ede9..71d932de111748b109163ee5315c79d6f15679de 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java @@ -16,16 +16,8 @@ package org.springframework.web.servlet.resource; -import static org.junit.Assert.*; -import static org.mockito.BDDMockito.*; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; - import java.util.Collections; import java.util.List; - import javax.servlet.http.HttpServletRequest; import org.junit.Before; @@ -35,6 +27,13 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockHttpServletRequest; +import static org.junit.Assert.*; +import static org.mockito.BDDMockito.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + /** * Unit tests for * {@link org.springframework.web.servlet.resource.WebJarsResourceResolver}. @@ -51,6 +50,7 @@ public class WebJarsResourceResolverTests { private HttpServletRequest request = new MockHttpServletRequest(); + @Before public void setup() { // for this to work, an actual WebJar must be on the test classpath @@ -59,6 +59,7 @@ public class WebJarsResourceResolverTests { this.chain = mock(ResourceResolverChain.class); } + @Test public void resolveUrlExisting() { this.locations = Collections.singletonList(new ClassPathResource("/META-INF/resources/webjars/", getClass())); @@ -87,7 +88,7 @@ public class WebJarsResourceResolverTests { @Test public void resolveUrlWebJarResource() { String file = "/underscorejs/underscore.js"; - String expected = "/underscorejs/1.8.2/underscore.js"; + String expected = "/underscorejs/1.8.3/underscore.js"; given(this.chain.resolveUrlPath(file, this.locations)).willReturn(null); given(this.chain.resolveUrlPath(expected, this.locations)).willReturn(expected); @@ -139,7 +140,7 @@ public class WebJarsResourceResolverTests { public void resolveResourceWebJar() { Resource expected = mock(Resource.class); String file = "/underscorejs/underscore.js"; - String expectedPath = "/underscorejs/1.8.2/underscore.js"; + String expectedPath = "/underscorejs/1.8.3/underscore.js"; this.locations = Collections.singletonList(new ClassPathResource("/META-INF/resources/webjars/", getClass())); given(this.chain.resolveResource(this.request, expectedPath, this.locations)).willReturn(expected);