Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play 2.4 and IntelliJ not resolving classes

I'm starting up my first Play 2.4 project and I'm having an issue with IntelliJ recognizing and finding the JUnit and Play test classes. Here is a screenshot of what I see

Issue

So basically, the code intelligence isn't picking up the JUnit dependency. The test appears to run fine when I run activator test.

Questions: What can I do to get code intelligence to pick these up Do I need to mark specific directories as sources?

I have restarted intellij, and rebuilt using sbt.

like image 761
Zarathuztra Avatar asked Jul 04 '15 15:07

Zarathuztra


1 Answers

Take a look at this answer: https://stackoverflow.com/a/19343428/1066240

All you need (after valid project import) is step no. 4:

  1. Click the red @Test annotation, hit Alt + Enter and choose Add junit.jar to the classpath
like image 194
biesior Avatar answered Sep 19 '22 08:09

biesior