I have a project in IntellijIDEA which was created with Maven. I then specified a set of dependencies and external repositories in the Pom.xml file.
The project builds fine on command line if I do "mvn install". When I open any of the code files in the IDE though it says all the classes handled by Maven dependencies aren't recognized - as it would for a normal project if I never added the required JARs to the build path.
I know in my Eclipse Maven projects (rather than IntelliJ) it usually shows an extra directory on the left which says "Maven Dependencies" and lists the JARs pulled in via maven. I don't see that here. What am I doing wrong?
Here's what my screen looks like:
If the dependencies weren't imported correctly (IntelliJ IDEA highlights them), try to perform the following actions: You can check your local maven repository in the Maven | Repositories settings and try to update it. You can check the jar file of the local . m2 repository to see if it was downloaded correctly.
Press Ctrl + Shift + A to find actions, and input "reload", you will find the "Reload All Maven Projects". On a Mac, use ⌘ + ⇧ + A instead.
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 :).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With