I'm using IntelliJ IDEA 13 (Community Edition) with the Scala plugin.
My initial import of an existing Scala project with a build.sbt
worked fine. The library dependencies were picked up by IDEA. Additional dependencies added after the initial import were not picked up, although I had checked the auto-import
option.
How can I force IDEA to reload the dependencies from build.sbt
?
You can force SBT to reload changes: Open SBT toolwindow (on the right side of IDE) and press refresh button.
If you use auto-import feature you need to save your file to force auto-refresh.
As of 7 Dec, 2013, the issue is solved. You need to update the Scala plugin in IntelliJ IDEA (this applies to both community and ultimate editions).
This is the link to the issue opened on JetBrains developer community web site: http://devnet.jetbrains.com/thread/451395
Perhaps this working only for some kind of projects, but in my case,
on the Library side, I do in
sbt
:publishLocal
on the Client side where the Library goes into, I click the menu item
Build -> Build (Ctrl-F9)
, and sometimes, when open Files or Intellisens are not yet current, I doCtrl-Alt-Y
(Menu itemFile -> Synchronize
) to get the file reflecting the refreshed code base.Not having to
refresh all sbt projects
is faster for me.Ticket for broken plublication of sbt.jetbrains is resolved. Updating scala plugin will fix this issue Ticket : http://devnet.jetbrains.com/thread/451395
This may be due to a broken publication of
org.jetbrains:sbt-structure:latest.integration
that occurred tonight, about 4 or 5 hours ago. Given that your post is 4 hours old ...You can see the ivy activity in
idea.log
(~/Library/Logs/IntelliJIdea13
or~/Library/Logs/IdeaIC13
on OSX).I have opened a ticket at JetBrains.
IF plugin gets 'stuck' it helps to invalidate cache (under file menu) and restart intellij.