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.