Using ElasticSearch Java API Client : repo is empty

I'm new using ElasticSearch Java API, and i want to create the connection with my instance.

I followed the instructions in the getting started section...

So i get the following code (as simple as on the exemple ! ) :

TransportClient mClient = new PreBuiltTransportClient(Settings.EMPTY).addTransportAddress(newInetSocketTransportAddress(InetAddress.getByName("host1"), 9300));

But I'm facing an issue about importing classes : TransportClient and Settings, that Eclipse cannot find...

Here is the maven import :

<dependency>
        <groupId>org.elasticsearch.client</groupId>
        <artifactId>transport</artifactId>
        <version>5.3.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>2.7</version>
    </dependency>
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.7</version>
    </dependency>

I tried to search bout this issue but didn't find the solution... Eclipse found without any problem the PreBuiltTransportClient.
I'm sure that Maven is configured, and when I tried to explore the maven repository, I only found the PreBuiltransportClient ! Nothing else !

Any idea to get a solution and elasticsearch java api working ?

Thanks in advance !

Does mvn install works from the CLI?

I tried a mvn clean & mvn install separatly. But it doesn't solve the issue...
Same thing when i take a look inside m2 repo....

So it's a pure eclipse error. Not sure how we can help then.

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