IntellijIDEA not recognizing classes specified in Maven dependencies

Right click on the pom.xml -> Add as Maven project -> Reimport

Maven import


After installing IntelliJ IDEA on a new computer I found myself with the same issue.

I had to update the remote maven repository. (Settings > Maven > Repositories)

enter image description here

Both local and remote repos needed to be updated. The remote one wasn't updated ever before this. After a restart everything worked fine. You might have to reimport your project.


For some reason re-import did not do the trick. After looking at this:

http://www.jetbrains.com/idea/webhelp/maven-importing.html

I set auto-import and then the problem went away though; hopefully it helps someone else. Thanks for the ideas everyone :).


You could go to:

File > Settings > Build, Execution, Deployment > Build Tools > Maven

and check if your pom.xml is not in the "Ignored Files" list.