Reputation: 8577
I got a compilation error in my project on package which belongs to Junit (in org.junit, org.junit.experimental.results, org.junit.internal, org.junit.internal.matchers, org.junit.matchers, org.junit.rules
).
all this classes are under junit package in my project, meaning: Security/src/org.junit, Security/src/org.junit.experimental.results
, where Security
is the name of my project. My classes that I wrote are under other package that I define: Security/src/myPackage/myClass
In all these classes, it gives a complation error in the import lines, for example:
import org.hamcrest.Description cannot be resolved
import org.hamcrest.Matcher cannot be resolved;
import static org.junit.matchers.JUnitMatchers.containsString cannot be resolved;
The checks are going OK (the green/red bar is display, and gives the correct result), but this problem give me an error on all the project.
Upvotes: 0
Views: 3232
Reputation: 39641
Your JUnit version needs Hamcrest. You should include it in your buildpath or use an older JUnit version.
There are different JUnit packages of the release 4.10:
Upvotes: 4