[MNG-7818] Removed exclusion of hamcrest from junit 4 by lprimak · Pull Request #1178 · apache/maven (original) (raw)
From test-arq-suite branch JUnit4 w/ removed workaround (locally built maven-3.9.x this PR + master shrinkwap-resolver + test-arg-suite, all updated with corresponding snapshots):
[DEBUG] junit:junit:jar:4.13.2:test
[DEBUG] org.hamcrest:hamcrest-core:jar:2.2:test (scope managed from compile) (version managed from 1.3)
[DEBUG] org.hamcrest:hamcrest:jar:2.2:test (scope managed from compile) (version managed from 2.2)
So, what happens, is that by placing hamcrest BEFORE junit in depMgt, the hamcrest will "overrule" the 1.3 from junit, and 2.2 (empty jar) depends on hamcrest:jar 2.2, so all good.