Search code examples
intellij-ideasbtsbt-assembly

How to run sbt-assembly tasks from within IntelliJ IDEA?


Is it possible to run sbt-assembly from within IntelliJ IDEA?

Also I read in the doc that one could add task within the SBT Tool window. But what I see is that it only helps you view your project not task? I cannot add any tasks there. How does the Tool window work exactly?

I have the last version of IntelliJ IDEA.


Solution

  • This answer is now out-of-date. IntelliJ now allows you to create a run configuration for an SBT task. You create the Run Configuration by :

    • choosing "Edit configurations" from the "Run" menu (or the toolbar popup)
    • click the "+" button to add a configuration and select "SBT Task" as the type of configuration you want to make.
    • fill out the details such as the name of the task and the working directory if necessary

    You can now run the task in the same way as any other run configuration; select it in the run configuration popup in the toolbar and click the run button (or if you're one of those keyboard-only people press shift-ctrl-r and select the task from the popup that appears)

    official documentation here : https://www.jetbrains.com/help/idea/2016.2/run-debug-configuration-sbt-task.html