如何从 IntelliJ IDEA 中运行 sbt-assembly 任务? [英] How to run sbt-assembly tasks from within IntelliJ IDEA?
问题描述
是否可以在 IntelliJ IDEA 中运行 sbt-assembly?
Is it possible to run sbt-assembly from within IntelliJ IDEA?
我还在文档中读到可以在 SBT 工具窗口中添加任务.但我看到的是它只帮助你查看你的项目而不是任务?我不能在那里添加任何任务.工具窗口究竟是如何工作的?
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?
我有最新版本的 IntelliJ IDEA.
I have the last version of IntelliJ IDEA.
推荐答案
这个答案现在已经过时了.IntelliJ 现在允许您为 SBT 任务创建运行配置.您通过以下方式创建运行配置:
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 :
- 从运行"菜单(或工具栏)中选择编辑配置"弹出)
- 单击+"按钮添加配置并选择SBT 任务"作为您要进行的配置类型.
- 填写详细信息,例如任务名称和必要时工作目录
您现在可以像任何其他运行配置一样运行任务;在工具栏中的运行配置弹出窗口中选择它并单击运行按钮(或者,如果您是那些只使用键盘的人之一,请按 shift-ctrl-r 并从出现的弹出窗口中选择任务)
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)
此处的官方文档:https://www.jetbrains.com/help/idea/2016.2/run-debug-configuration-sbt-task.html
这篇关于如何从 IntelliJ IDEA 中运行 sbt-assembly 任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!