IntelliJ cannot resolve Junit for Maven project

EDIT – Solved via Comments: In your screenshot, there is a test.iml located in your test folder. Is there perhaps an exclusion or something? Can you try deleting that file?


You can try to Invalidate Caches in IntelliJ (via File | Invalidate Cache).

You can also try and rebuild your project from within the IDE (via Build | Rebuild Project).

You could also try to Synchronize the Project (Reimport All Maven Projects) via Maven (there should be a Maven Tab somewhere on the right side or via typing Maven Projects into Ctrl + Shift + A).

Leave a Comment