Duplicate library dependency after version change
I'm having a problem with the sbt dependencies.
When I change the version of a dependency intellij will retrieve it and will add it to the project as a library.
The problem is that it wont remove the previous version, leaving both the versions there.
This is causing bad class resolution (I think).
To fix this I would need to regenerate the whole project struture.
I'm using latest stable version of intellij and scala plugin.
Any idea if its only me?
Please sign in to leave a comment.
I faced the same issue (Multiple versions of scala libraries detected! and build fails) and could figure out a solution after comparing the build which works fine even with this mismatch, in Jenkins build (somehow in my Windows machine it was working but not in Mac).
Solution is to use a specific maven-scala-plugin version; which I was not using earlier, so latest available version was used! (there may be other specific versions which would also work fine
Please try out and comment here if this helped to resolve your case!
Also experienceing this issue on the latest Intellij.
Using Matej Kobza work around to deal with the issue, although without the "rm **/*.iml" stage, which doesn't seem to be necessary, at least for me.
They closed the original ticket, but it is still happening so I posted another with screenshots: https://youtrack.jetbrains.com/issue/IDEA-288515