Consider the following sbt plugin definition which "overrides" the default "it" configuration to extend the Test configuration (for reasons discussed at How to make "test" classes available in the "it" (integration test) configuration?)
import sbt._
import Keys._
object MyPlugin extends AutoPlugin {
private lazy val IntegrationTest = config("it") extend(Test)
override def projectSettings: Seq[Setting[_]] = Seq(
...
) ++ inConfig(IntegrationTest)(Defaults.itSettings)
override def projectConfigurations: Seq[Configuration] = IntegrationTest :: Nil
}
While this seems to work in general, it "masks" the run task. See the following sbt output from a project which uses the above described plugin:
[myproject] $ inspect run
[info] Input task: Unit
[info] Description:
[info] Runs a main class, passing along arguments provided on the command
line.
[info] Provided by:
[info] {file://myproject/}myproject/it:run
[info] Defined at:
[info] (sbt.Defaults) Defaults.scala:307
...
Note it:run instead of compile:run. Somehow the re-definition of the "it" config seems to re-define/mask the run task. This does not happen if I choose e.g. "fun" instead of "it". I'm using sbt 0.13.15.
Any idea what's going on here and how to prevent the run task from being masked?