I am using Eclipse Oxygen 1a, with the Scala IDE installed, and have imported a legacy project into it. I have been updating dependencies and trying to resolve various warnings and conflicts, but have come across one that has me stumped.
In the code there is the following:
val messageMatcher = equalTo(expectedMessage)
messageMatcher.describeMismatch(item, mismatchDescription);
messageMatcher.matches(item.toString)
Now when I click on "equalTo" it jumps to the the source for Matchers.class in the hamcrest-all-1.3.jar. The describeMismatch line however shows the error:
value describeMismatch is not a member of org.hamcrest.Matcher[String]
When I click on the next line "messageMatcher.matches" it tries to open the Matcher.class source from the junit-4.10-sources.jar.
Now I am aware that there is a conflict between junit 4.10 and hamcrest since junit has an older version of hamcrest as a transitive dependency, but the part that's baffling me is that I'm not using junit 4.10 anywhere afaik. When I run:
$ mvn dependency:tree
There is no mention of junit 4.10. I also did a grep on the entire directory structure and there is no mention of junit 4.10 in any file contained in the project.
If I delete junit 4.10 from my local repo the hamcrest error above goes away, but is replaced by an error saying
Project 'myproject' is missing required library: '~/.m2/repository/junit/junit/4.10/junit-4.10.jar'"
I am baffled...
Edit:
"Now I am aware that there is a conflict between junit 4.10 and hamcrest since junit has an older version of hamcrest as a transitive dependency, but the part that's baffling me is that I'm not using junit 4.10 anywhere afaik."