问题描述
我使用 sbt 0.13.1
.
要列出 sbt 项目中的任务,可以使用 sbt tasks -V代码>.
To list the tasks in a sbt project, one can use sbt tasks -V
.
As 一个命令"看起来类似于一个任务:它是一个命名的可以从 sbt 控制台执行的操作 和 通常,您当你需要做一些在常规任务中不可能的事情时会求助于命令,我怎么知道什么命令可用于 sbt 项目?
As A "command" looks similar to a task: it's a named operation that can be executed from the sbt console and Typically, you would resort to a command when you need to do something that's impossible in a regular task, how can I know what commands are available for a sbt project?
是否有类似的命令可以列出 sbt 项目中的所有命令?
Is there a similar command to list all of the commands in a sbt project?
比如说,sbt-idea 插件安装在 sbt 项目中.我如何查询项目以了解 gen-idea
命令?
Say, the sbt-idea plugin's installed in a sbt project. How could I query the project to find out about the gen-idea
command?
鉴于 @Mark Harrah 的评论,这太令人困惑了:gen-idea 是一个命令,而不是一个任务." 以及 sbt-idea
插件的文档,它说 "使用 gen-idea sbt 任务创建 Idea 项目文件."(注意使用 task强>).我很困惑.
It's so confusing given the comment of @Mark Harrah: "gen-idea is a command, not a task." and the documentation of the sbt-idea
plugin where it says "Use the gen-idea sbt task to create Idea project files." (note the use of task). I am confused.
推荐答案
不带任何参数的帮助"不是可以做到这一点吗?根据我的理解,不带任何参数的任务"将列出可用任务,而帮助"不带参数将对命令执行类似的操作.
Doesn't "help" without any arguments do that? From my understanding "tasks" without any arguments will list available tasks and "help" w/o arguments will do a similar things for commands.
这篇关于如何知道 sbt 中可用的命令(=命名操作)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!