Idea not updating dependency in maven project Follow
My maven project has a dependency on a jar in the local maven repository. I updated the version in the pom file, but the version brought into the project stayed the old version. When I decompiled the class I found the path was to the old version.
After investigation the problem was that the version of the jar in .idea/libraries was still referring. I moved the old .idea directory somewhere else and re-imported project and it got the right version. I did invalidate caches before doing this. What is the proper way to force IDEA to update a dependency jar?
I also deleted my ~/.m2/repository directory and ran mvn clean install at the command line. With this the correct version of the jar was the only one placed in the repository.
I'm using Community Edition 2021.1.
Please sign in to leave a comment.
Please try 2021.1.1 Preview version (can be downloaded from https://confluence.jetbrains.com/display/IDEADEV/IDEA+2021.1+latest+builds or via Toolbox App). It has related issues fixed: https://youtrack.jetbrains.com/issue/IDEA-255594