Closed
Description
Spring Boot Starter Test still uses old Hamcrest 1.3. Now Hamcrest 2.1 released after 3 years and have many new matchers, so it make sense to use it in Spring Boot Starter Test, Please check this url
for more details:
hamcrest/JavaHamcrest#224
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
[-]Add Support For Hamcrest 2.1 in Spring Boot Starter Test[/-][+]Upgrade to hamcrest 2.1[/+]wilkinsona commentedon Jan 10, 2019
Thanks for the suggestion, but I'm not sure that it makes sense, at least not without considering other dependencies.
JUnit 4.12 depends on Hamcrest 1.3. We'd either need to be certain that it is compatible with 2.1 or consider the Hamcrest upgrade alongside a switch to JUnit 5 (version 5 dropped JUnit's Hamcrest dependency).
wilkinsona commentedon Jan 10, 2019
Let's consider this in 2.2.x alongside #14736.
wilkinsona commentedon May 17, 2019
This may still be blocked. While we have upgraded to JUnit 5 in
spring-boot-starter-test
, to allow users to gently migrate to it, we provide JUnit's Vintage Engine and the JUnit 4 API in the starter. Unfortunately, this means that Hamcrest 1.3 is still pulled in.@sbrannen Do you know if JUnit 4, when being used "just" as an API on top of the Vintage Engine, requires Hamcrest 1.3, or can we exclude it and upgrade to 2.1?
28 remaining items