Can't find elasticsearch on maven repositories - IntelliJ

(Carlos Vega Moreno) #1

Even though I'm using elasticsearch 1.7.2 through maven on IntelliJ IDEA, I'm not able to add the new 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

(David Pilato) #2

What exact error message you have?

elasticsearch 2.0.0 exists in maven central repositories:

(Carlos Vega Moreno) #3

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.

(David Pilato) #4

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?

(Carlos Vega Moreno) #5

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.

(Jörg Prante) #6

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

(Carlos Vega Moreno) #7

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:
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
... 5 more

(Carlos Vega Moreno) #8

The error that I get is in this line:

Settings settings = Settings.settingsBuilder().put("", 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:;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.(
at org.elasticsearch.common.settings.Settings.(
at org.elasticsearch.common.settings.Settings$
at ElasticSender.getClient(

(Carlos Vega Moreno) #9

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.


(Jörg Prante) #10

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

(Mary ) #11

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.

(system) #12