I have a dependency coexistence here: isNotNullValue()
method exists in different jars in my Spring Boot application and this picture shows what I get for now:
As you can see, I have:
wiremock.org.hamcrest.core.IsNull
wiremock.org.hamcrest.CoreMatchers
org.hamcrest.core.IsNull
org.hamcrest.Matchers
org.hamcrest.CoreMatchers
Which one should I import?
I guess hamcrest-library
is the right jar, but I am not sure.
Some guidelines to follow when:
- same method exists simultaneously in several jars, while some should be shadowed but not(like in
wiremock.org.hamcrest
) - same method exists in several different jars of same dependency, as in
hamcrest-core
andhamcrest-library
?