Current module dependent es6.3.2,but other module dependent current module show it's dependency is es2.4.4

Please don't post images of text as they are hardly readable and not searchable.

Instead paste the text and format it with </> icon. Check the preview window.

Check your pom.xml file. Run the dependency tree plugin. Should tell you details hopefully.
Probably you have another dependency which is using another version.

Thanks for your fast reply . es2.4.4 is not in my dependency. the dependency tree like this.
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ exam-dal ---
[INFO] com.exam:exam-dal:jar:1.0-SNAPSHOT
[INFO] - org.elasticsearch:elasticsearch:jar:6.3.2:compile
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building exam-manager 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ exam-manager ---
[INFO] com.exam:exam-manager:jar:1.0-SNAPSHOT
[INFO] - com.exam:exam-dal:jar:1.0-SNAPSHOT:compile
[INFO] - org.elasticsearch:elasticsearch:jar:2.4.4:compile

I'm pretty sure you defined in your com.exam:exam-manager a direct dependency to org.elasticsearch:elasticsearch:jar:2.4.4:compile. Could you share your pom.xml if you did not?

Thanks. I'm sure there is not any direct dependency es2.4.4 in this pom.

Can you reproduce it with a simple pom.xml I can use?

Certainly.Here is the pom.

    <dependency>
        <groupId>org.elasticsearch.client</groupId>
        <artifactId>elasticsearch-rest-high-level-client</artifactId>
        <version>6.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.elasticsearch.client</groupId>
        <artifactId>elasticsearch-rest-client</artifactId>
        <version>6.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.elasticsearch</groupId>
        <artifactId>elasticsearch</artifactId>
        <version>6.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.2</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.4.5</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpasyncclient</artifactId>
        <version>4.1.2</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore-nio</artifactId>
        <version>4.4.5</version>
    </dependency>
    <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.10</version>
    </dependency>
    <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.1.3</version>
    </dependency>

This is only one part of the pom.xml. Not a full one.

And BTW I don't think you need to declare all those deps.
Only:

    <dependency>
        <groupId>org.elasticsearch.client</groupId>
        <artifactId>elasticsearch-rest-high-level-client</artifactId>
        <version>6.5.1</version>
    </dependency>

Should be enough. I recommend using 6.5.1 BTW.

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