通過運行
> tasks -v
編輯:如果不工作考慮增加更多的「v」可以,如tasks -vvv
,甚至tasks -V
看到所有的任務。
我明白了,例如,cover
:
This is a list of tasks defined for the current project.
It does not list the scopes the tasks are defined in; use the 'inspect' command for that.
Tasks produce values. Use the 'show' command to run the task and print the resulting value.
check Executes the tests and saves the execution data in 'jacoco.exec'.
classesToCover compiled classes (filtered by includes and excludes) that will be covered
clean Cleaning JaCoCo's output-directory.
compile Compiles sources.
console Starts the Scala interpreter with the project classes on the classpath.
consoleProject Starts the Scala interpreter with the sbt and the build definition on the classpath and useful imports.
consoleQuick Starts the Scala interpreter with the project dependencies on the classpath.
copyResources Copies resources to the output directory.
cover Executes the tests and creates a JaCoCo coverage report.
coveredSources Covered Sources.
還要注意說話是算數的開頭(包裝爲清楚起見):
It does not list the scopes the tasks are defined in;
use the 'inspect' command for that.
導致
> inspect cover
[info] No entry for key.
[info] Description:
[info] Executes the tests and creates a JaCoCo coverage report.
[info] Delegates:
[info] *:cover
[info] {.}/*:cover
[info] */*:cover
[info] Related:
[info] jacoco:cover
所以你知道運行jacoco:cover
任務-v在pure sbt項目中顯示jacoco任務,但它並不顯示任何在框架項目中的作用。但謝謝你的回答 –
@Cloudtech我明白你的意思。我已經添加了有關如何在簡單的遊戲應用中查看的詳細信息。 –