I use IntelliJ IDEA 13.1 Community Edition with the Scala plugin 0.32.593.
What's the recommended way to execute a SBT plugin's tasks, say dependencyUpdates
from sbt-updates?
I use IntelliJ IDEA 13.1 Community Edition with the Scala plugin 0.32.593.
What's the recommended way to execute a SBT plugin's tasks, say dependencyUpdates
from sbt-updates?
In version 15
of IntelliJ IDEA, using Scala Plugin version 2.0
, you can run SBT
tasks by adding a run configuration.
First add a new run configuration by clicking on Run -> Edit Configurations
. Then click the +
button to add a new configuration and choose SBT Task
form the list
Now provide the list of tasks separated by space in Tasks
input box:
NOTE IntelliJ IDEA and the Scala and sbt plugins have improved since and you may want to read How to run sbt-assembly tasks from within IntelliJ IDEA? instead.
I worked it around with the Embedded Terminal plugin that shipped with the version of IDEA.
Alt+F12 (or Tools
> Open Terminal
) to open a terminal window and then sbt dependencyUpdates
inside.
It does require a local installation of SBT.
Unless there has been a recent change (in 13.1), SBT plugin doesn't support running sbt tasks.
See comments here http://blog.jetbrains.com/scala/2013/11/18/built-in-sbt-support-in-intellij-idea-13/
You will have to run these two commands to run SBT in the terminal:
SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
java $SBT_OPTS -jar `<SBT inatall>`/bin/sbt-launch.jar "$@"