Adding a new dependency in pom.xml

Environment:

Windows 7 Professional. IDEA: 14.0.3, Ultimate Edition 139.1117

I can't believe I am having difficulties with this.

1. I have a pom.xml that I successfully import as a project in IDEA using File -> Import Project. Now, I want to add a new aMaven dependency (hibernate-entitymanager) in it. Naturally, I open pom.xml in the editor and try adding in <dependencies>, the following <dependency>:

dependency-add-1.PNG
Note that the cursor jumps between <artifactId> tags and not the <groupId> tags. This is the first annoyance.

2. Many of the dependencies are already in ~/.m2, and I expected it to do code completion. So, after placing the cursor between groupId tags, I expect it to complete the code and here is what I see:

dependency-add-2.PNG
3. I have to add the entire text all by myself. Only after I have added the snippet (or copied+pasted from someplace like mvnrepository.com) does it proceed.
4. So, my question is, how do I make IDEA recognize pom.xml better and help me quickly adding dependencies? Am I missing something basic?

4 comments
Comment actions Permalink

Please check https://www.jetbrains.com/idea/help/generating-maven-dependencies.html .

There may be some issue with Maven process invokation, check idea.log for errors: https://intellij-support.jetbrains.com/entries/23352446 .

0
Comment actions Permalink

Thank you, Serge.

But my issue persists (with no results, no matter what I do), as shown here:

dependency-add-3-no-results.PNG
There's nothing in idea.log other than:

2015-03-24 16:02:00,426 [111784253]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 31 ms
2015-03-24 16:02:50,745 [111834572]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 38 ms

0
Comment actions Permalink

Please conyact support via https://intellij-support.jetbrains.com/home/ with the full idea.log and a sample project to reproduce.

0
Comment actions Permalink

Here's the project to which I was trying to add the hibernate dependencies:

https://github.com/kedarmhaswade/spring-hibernate-810

0

Please sign in to leave a comment.