Can't find elasticsearch on maven repositories - IntelliJ

Even though I'm using elasticsearch 1.7.2 through maven on IntelliJ IDEA, I'm not able to add the new dependency:

<dependency>
	<groupId>org.elasticsearch</groupId>
	<artifactId>elasticsearch</artifactId>
	<version>2.0.0</version>
</dependency>

I added it to the pom file but I cannot find it on the maven repositories when I try to add it to the Project through the Project Settings > Libraries > +

Is there any way to update the Maven repositories and find the new API? I'm able to find other libraries like the ones about elasticsearch-twitter or elasticsearch-wikipedia

Thanks in advance

What exact error message you have?

elasticsearch 2.0.0 exists in maven central repositories:

https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/2.0.0/

None, I know it is on the maven repositories but I cannot find it in IntelliJ IDEA. I write org.elasticsearch on the dependency finder and I get no results at all. Neither about the rest of versions.

You mean? When you try to autocomplete when editing the pom.xml file?
May be you have to update the repositories indices? But I think it's not a question specifically related to elasticsearch but to IntelliJ, right?

May be you have to update the repositories indices?

I did.

I mean when I go to Project Structure > Libraries and then try to add the dependency by clicking on the + icon and looking for it in the finder.

But I think it's not a question specifically related to elasticsearch but to IntelliJ, right?

Nope, is not, but I thought that maybe more people had the same problem because is a problem with the elasticsearch dependencies. There is no problem with other libraries.

Everything's fine with IntelliJ IDEA and ES 2.0 here. Use Maven toolbar and the button "Reimport All Maven Projects"

Not sure why you can find elasticsearch-twitter or elasticsearch-wkipedia, they are no longer available for ES 2.0

I can't find it when I look on the Maven dependency finder. And I get this execution error when I add the JAR manually:

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap

Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableMap
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 5 more

The error that I get is in this line:

Settings settings = Settings.settingsBuilder().put("cluster.name", Receptor.clusterName).build();

Everything looks fine for me but I don't know why I keep getting this error:

Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
at org.elasticsearch.common.Strings.(Strings.java:459)
at org.elasticsearch.common.settings.Settings.(Settings.java:88)
at org.elasticsearch.common.settings.Settings$Builder.build(Settings.java:1211)
at ElasticSender.getClient(ElasticSender.java:75)

I solved the issue by creating a new idea project and adding my sources and the maven dependencies manually to the pom. Everything fine now, something must be corrupted in the idea files.

Thanks

Normally, by opening a Maven project, IntelliJ imports all maven dependencies automatically.

Usually when I have an issue like that (nothing changes no matter how many repos I added and several versions. Reimporting , Downloading sources to maven projects) there is something wrong with the pom structure.