Home > Blockchain >  Intellij doesn't update to correct version of the dependency
Intellij doesn't update to correct version of the dependency

Time:09-07

I am using IntelliJ Ultimate version 2022.1. I have the following pom.file:

....
  </build>
  <dependencies>
    <dependency>
      <groupId>io.dexi</groupId>
      <artifactId>webi-common-rest-service</artifactId>
      <version>1.15.61</version>
    </dependency>
  </dependencies>
</project>

I have run from the terminal and from IntelliJ the command mvn clean install. To check if I have the correct version of the library I run the command mvn dependency:tree and the result is as follows:

[INFO]  - io.dexi:webi-common-rest-service:jar:1.15.61:compile
[INFO] |   - com.squareup.retrofit2:retrofit:jar:2.4.0:compile
[INFO] |  |  \- com.squareup.okhttp3:okhttp:jar:3.10.0:compile
[INFO] |   - com.squareup.okio:okio:jar:1.13.0:compile

It retrieves the correct version of the library(1.15.61). But when I open a file of that library in the IntelliJ it defaults to the wrong version as is shown below: enter image description here

I have tried to update the IntelliJ to the latest version and download the latest patches but the problem still persisted.

Also, I tried to invalidate caches and restart IntelliJ. Despite everything I do, this IntelliJ does not show the correct version library.

CodePudding user response:

I solved this issue by downgrading the version with IntelliJ. The version that worked for me was: IntelliJ 2019.1.4.

I hope that IntelliJ fixes this issue since working with older versions is not ideal.

  • Related