Issue
I have parent project and 4 children modules. I have added junit dependency in parent like this:
<dependencys>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencys>
Now I am testing some java classes in childreen modules and I get error messsage in eclipse:
The import org.junit cannot be resolved
Do I have to add junit dependency to all children modules or what is the best practice?
Solution
move junit dependency from dependencyManagement to dependencies should solve the problem
Answered By - Ronald
Answer Checked By - Cary Denson (JavaFixing Admin)