Scala 执行sbt tasks命令时无法看到jacoco任务(-v也已尝试)

Scala 执行sbt tasks命令时无法看到jacoco任务(-v也已尝试),scala,sbt,jacoco,Scala,Sbt,Jacoco,我试图使用jacoco将测试报告集成到我的sbt项目中 我将jacoco.settings添加到build.sbt 我还将addSbtPlugin(“de.johoop”%“jacoco4sbt”%“2.1.6”)添加到plugins.sbt 当我运行sbt jacoco:check时,它工作正常。但是,当我尝试查看jacoco有多少任务时,sbt tasks没有显示任何与jacoco相关的内容 我必须去看源代码 我可以知道为什么没有为sbt tasks命令显示jacoco,以及查看插件所有可

我试图使用jacoco将测试报告集成到我的sbt项目中

我将
jacoco.settings
添加到
build.sbt

我还将
addSbtPlugin(“de.johoop”%“jacoco4sbt”%“2.1.6”)
添加到
plugins.sbt

当我运行
sbt jacoco:check
时,它工作正常。但是,当我尝试查看jacoco有多少任务时,
sbt tasks
没有显示任何与jacoco相关的内容

我必须去看源代码

我可以知道为什么没有为
sbt tasks
命令显示jacoco,以及查看插件所有可用任务的更好方式吗

编辑:

我怀疑语句
lazy val Config=Config(“jacoco”)extend(Test)hide
意味着jacoco扩展了测试任务,因此它不会在sbt任务中显示,但我不确定

通过运行

> tasks -v
<>编辑:如果不起作用,考虑添加更多的“V”s,如“代码>任务-VVV ,或者甚至<代码>任务-V查看所有任务。

例如,我看到,
封面

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.
还要注意开头的内容(为了清晰起见,请包装):

这导致了

> 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

tasks-v在纯sbt项目中显示jacoco任务,但在play framework项目中它不显示任何内容。但是谢谢你的邀请answer@Cloudtech我明白你的意思。我添加了有关如何在简单的play应用程序中查看它的详细信息。
> 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