Code is working fine in Eclipse Oxygen 3, but the same code showing error in Eclipse Photon.
Error : The type org.hamcrest.Matcher cannot be resolved. It is indirectly referenced from required .class files
pom.xml : Dependencies for hamcrest
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
Anyone has any idea about how can i remove this error?