Maven – IntelliJ IDEA and Maven: Can’t complete tutorial, Maven Artifact Search returns no classes

intellij-ideamaven

I'm working through the tutorial here for using Maven under IntelliJ:
http://wiki.jetbrains.net/intellij/Creating_and_importing_Maven_projects

I'm up to the 'working with dependencies' section. I try to add a Maven Dependency using Maven Artifact Search. In the 'search for class' tab, nothing shows up, no matter what I type in the search box. Under 'search for artifact', about two dozen dependencies show up at the start.

Most of the discussions about this type of issue suggest a problem with Maven settings in IntelliJ. I confirmed that the Maven home directory is set properly. Under 'Repositories', the http://repo1.maven.org/maven2 URL is there and I was able to update it.

I used search.maven.org to double check that searching by class name does produce a result for the value I search for, "TestCase". I am using Maven 3.1.1, Windows 7 x64, JDK 1.7 64bit.

Update:
Maven works, i.e. goals can be run and they will download dependencies and build the project, if I edit pom.xml manually. However the Artifact Search cannot find any class, ever. I included a screenshot of what shows up when I use Artifact Search to search for artifacts. (Link to my image does not seem to appear even though I uploaded right to SO, not sure why… maybe imgur is blocked at my location)

Only Artifact Search finds anything, and only these items

Best Answer

Please navigate in Settings to Project settings -> Maven -> Repositories Then find repo1 on your list and click "Update" - that will rebuild your repositories indexes and search for class will work