问题
I have a project on eclipse in which junit is included as dependency in pom.xml:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
The project compiles well and dependency is properly resolved. I created my test folder under /src directory and added some class. However, the namespace org.junit cannot be found on my code until I "Fix project setup" to include JUnit4 Maven Dependency.
I think this should not be necessary since I included the dependency on the pom.xml. Right?
What I am doing wrong here?
来源:https://stackoverflow.com/questions/60776770/java-maven-eclipse-junit-package-not-found