I have to delete the .idea directory and re-import project from pom file every time I add a new maven dependency. How do I fix this?


Every time I make a change to the dependencies in the pom file, IntelliJ starts the auto-import process. The "Resolving dependencies of project" hangs on the last dependency requirement. If I just invalidate caches and restart, the new dependencies won't resolve in the code. But if I close IntelliJ, delete the .idea directory, open IntelliJ and Import Project from the pom again, the dependencies resolve.


Anyone know how I can fix this?

1 comment


Do you use proxy in your network? What Maven version do you use ("Settings | Build... | Build Tools | Maven")?

Possible related issues: https://youtrack.jetbrains.com/issue/IDEA-163509, https://youtrack.jetbrains.com/issue/IDEA-181511


Please sign in to leave a comment.