Gradle configuration in Java Rest client 5.0

I am new to Gradle. I want to use java rest client using gradle configuration. So I created a gradle project and defined dependency in build.gradle as follows.

dependencies {
compile 'org.elasticsearch.client:rest:5.0.1'

But on compilation, I am getting the following error.

  • What went wrong:
    Could not resolve all dependencies for configuration ':compile'.

Cannot resolve external dependency :org.elasticsearch.client:rest because no repositories are defined.
Required by:

Please help me.

I think it's a gradle misconfiguration probably.
But I have no idea.

May be using debug mode will tell you more?


repositories {

in your build.gradle. Read

Hi Jprante,
elasticsearch has also removed gradle configuration (as I used) from its documentation. So now this will work. :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.