Maven dependency suggestions in IDEA 13

I use Intellij IDEA 13 on Ubuntu 13.10 (in Virtualbox) and maven for a project. Everything worked fine up until recently, when IDEA suddenly stopped giving suggestions for groupId, artifactId etc. for dependencies. I didn't do any changes to setting in IDEA or anywhere else. The only change I can remember doing around the same time was updating Virtualbox.

I noticed that in settings => maven => repositories the remote repository was set to http://repo.maven.org/maven2, and it gave an error. After fiddling a lot it suddenly changed back to http://repo1.maven.org/maven2 and doesn't give any error anymore.
But I still have the problem where IDEA refuses to give any suggestions when editing pom.xml files (except the modules in my project). If I run the build, it downloads all the depdencies and everything seems to work well.

Also, in "Artifactory or Nexus Service URLs" the http://oss.sonatype.org/service/local/ doesn't return any repositories. Don't know if it relevant.

2 comments

Try to clean maven indexes:
1.) close IDEA
2.) remove $USER_HOME/.IntelliJIdea13/system/Maven  
3.) run IDEA
4.) reimport project
5.) open settings => maven => repositories and update repository indexes.

0

Now it's back to http://repo.maven.apache.org/maven2. It seems that it tries to use that repository whenever I set up a new project. Any way of fixing that?

One important note too, I'm using Java8.


Edit 1:
Tried setting repository to http://repo1.maven.apache.org/maven2 directly in the root-pom to see if it works, but that gives an error when trying to update too. Both give this error:

java.lang.RuntimeException: java.io.IOException: AuthorizationException when retrieving nexus-maven-repository-index.properties

Edit 2:
Tried changing to Intellij 13.0.3 from 13.1.1 and following your steps, which worked. Now it uses http://repo1.maven.apache.org/maven2, and when I updated the index it worked and I now get suggestions in the pom :)

0

Please sign in to leave a comment.