elastic / elastic/elasticsearch-java

Elasticsearch-java as a Jigsaw module

Open
#308 2 comments 0 reactions 0 assignees View on GitHub
Category: Enhancement
Dominant language
Java
Stars
524
Forks
300
Avg merge
1d 11h
Merged PRs (30d)
16

Description

### Java API client version

8.2.2

### Java version

17

### Elasticsearch Version

8.2.2

### Problem description

In the following issue: [Make it possible to use the high level rest client with modularized (jigsaw) applications](https://github.com/elastic/elasticsearch/issues/38299) it is mentioned that the issue was closed with the resolution being this new repository, however, I am at a loss at understanding how it was fixed in this way.

In the same idea as the original issue, I created a minimal Gradle Spring Boot, in which I added as a dependency the elasticsearch-java client:
` implementation "co.elastic.clients:elasticsearch-java:8.2.2"
`

I also added a module-info.java that tries to require different modules from elasticsearch:
```
requires elasticsearch.rest.client;
requires elasticsearch.java;
requires elasticsearch;
```

All the time the same error was thrown:
```
module not found: elasticsearch.rest.client
module not found: elasticsearch.java
module not found: elasticsearch

```
Looking into the MANIFEST.MF there is no mention of any automatic module name for the project, nor is there are any module-info.java that I could find, so I am not sure how to proceed with using it.

My question would be: can we use elasticsearch-java as a Java 9 module? This is requirement on our side, so any way of doing it will work for us, the important thing is to move on with it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.