From 303fc3211c1eba3ea434fcf4fab64e72e723f99f Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 17 Aug 2019 18:44:47 +0200 Subject: [PATCH] Upgrade to Hamcrest 2.1 Closes gh-23467 --- build.gradle | 2 +- spring-test/spring-test.gradle | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index b44b7ab980..4004dc1a28 100644 --- a/build.gradle +++ b/build.gradle @@ -143,7 +143,7 @@ configure(allprojects) { project -> } testCompile("org.mockito:mockito-junit-jupiter:3.0.0") testCompile("io.mockk:mockk:1.9.3") - testCompile("org.hamcrest:hamcrest-all:1.3") + testCompile("org.hamcrest:hamcrest:2.1") testCompile("org.assertj:assertj-core:3.13.1") // Pull in the latest JUnit 5 Launcher API to ensure proper support in IDEs. testRuntime("org.junit.platform:junit-platform-launcher") diff --git a/spring-test/spring-test.gradle b/spring-test/spring-test.gradle index 5087e67f0d..5fe51cddfd 100644 --- a/spring-test/spring-test.gradle +++ b/spring-test/spring-test.gradle @@ -27,12 +27,14 @@ dependencies { optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1") optional("javax.xml.bind:jaxb-api:2.3.1") optional("javax.websocket:javax.websocket-api:1.1") - optional("junit:junit:4.13-beta-3") + optional("junit:junit:4.13-beta-3") { + exclude group: "org.hamcrest", module: "hamcrest-core" + } optional("org.junit.jupiter:junit-jupiter-api") optional("org.testng:testng:6.14.3") optional("org.aspectj:aspectjweaver:${aspectjVersion}") optional("org.codehaus.groovy:groovy:${groovyVersion}") - optional("org.hamcrest:hamcrest-core:1.3") + optional("org.hamcrest:hamcrest:2.1") optional("org.apache.taglibs:taglibs-standard-jstlel:1.2.5") { exclude group: "org.apache.taglibs", module: "taglibs-standard-spec" } @@ -46,7 +48,9 @@ dependencies { exclude group: "commons-logging", module: "commons-logging" exclude group: "io.netty", module: "netty" } - optional("org.xmlunit:xmlunit-matchers:2.6.2") + optional("org.xmlunit:xmlunit-matchers:2.6.2") { + exclude group: "org.hamcrest", module: "hamcrest-core" + } optional("org.skyscreamer:jsonassert:1.5.0") optional("com.jayway.jsonpath:json-path:2.4.0") optional("org.jetbrains.kotlin:kotlin-reflect") @@ -63,7 +67,9 @@ dependencies { testCompile("javax.mail:javax.mail-api:1.6.2") testCompile("org.hibernate:hibernate-core:5.4.3.Final") testCompile("org.hibernate:hibernate-validator:6.0.17.Final") - testCompile("org.junit.platform:junit-platform-runner") + testCompile("org.junit.platform:junit-platform-runner") { + exclude group: "junit", module: "junit" + } testCompile("org.junit.platform:junit-platform-testkit") testCompile("org.junit.jupiter:junit-jupiter-params") testCompile("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}") @@ -77,9 +83,13 @@ dependencies { exclude group: "commons-logging", module: "commons-logging" } testCompile("io.projectreactor.netty:reactor-netty") - testCompile("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1") + testCompile("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1") { + exclude group: "junit", module: "junit" + } testRuntime("org.junit.jupiter:junit-jupiter-engine") - testRuntime("org.junit.vintage:junit-vintage-engine") + testRuntime("org.junit.vintage:junit-vintage-engine") { + exclude group: "junit", module: "junit" + } testRuntime("org.glassfish:javax.el:3.0.1-b08") testRuntime("com.sun.xml.bind:jaxb-core:2.3.0.1") testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0.1")