Reputation: 273
I have the below Maven/Eclipse setup and I have already added junit as a compile time dependency in pom.xml.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
</dependency>
Can anyone clarify why I am being prompted by Eclipse to add junit to build path?
Thank you
Upvotes: 4
Views: 1529
Reputation: 24560
You need JUnit 4 if you want to use annotations.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
Upvotes: 2
Reputation: 10112
Do following:
Update maven project.
Clean your project.
And then re run your test
Upvotes: 0