POM type dependency in gradle


Elasticsearch has made one of their recent client releases as type ‘pom’.


Adding following dependency to gradle does not work.

compile group: 'org.elasticsearch.client', name: 'elasticsearch-rest-high-level-client', version: '6.4.1', ext: 'pom'

Looks like gradle doesn’t resolve all the dependencies when it is of type ‘pom’. Is there a way to make this work in gradle?

By specifying ext: 'pom' you are creating an artifact-only dependency that resolves the pom file itself. Instead, remove the specified pom extension and the the dependencies you expect will be resolved.

compile group: 'org.elasticsearch.client', name: 'elasticsearch-rest-high-level-client', version: '6.4.1'