I\'m new to Intellij Idea, i just import a project with pom.xml
, but the ide didn\'t resolve anything in maven dependencies.
Anything defined in p
try maven command shared below it would work!
mvn idea:idea
Unfortunately I ran into the same issue and I was head scratching why this is happening. I almost tried everything on this page and but none worked for me.
So , I tried to go the root of this problem; and the problem was (Atleast for me) that I was trying to open a maven project but pom file was not identified. So right clicking on the pom file and choosing "add as maven project" and then right clicking on the project -> Maven -> Reimport did all the magic for me :)
Hopefully this can be helpful for someone.
In IntelliJ 12.1.4 I went through Settings --> Maven --> Importing
and made sure the following was selected:
This took me from having a lot of unresolved import statements to having everything resolved. I think the key here was using Maven3 to import project... Hopefully this helps.
I have just had this issue when adding <dependency>...</dependency>
elements to a <profile>
. I just found that if I add (insert) the unresolved dependency elements to the <dependencies>
element, the dependencies are downloaded from the maven repository; I can then remove the dependency element from the dependencies element.
To me the problem what that I had to check the box "Import maven projects automatically" under Setting> Maven>Importing
Using default maven (which comes with IntelliJ) also could create this problem. So configure the maven which you have installed.
This can be done from: File -> Settings -> Build, Execution, Deployment -> Maven
Update following settings according to your maven installation: