Let's say that I wan to override (replace) the default setting for the packageBin
task. So I naively wrote an AutoPlugin like this:
object TestPlugin extends AutoPlugin {
override def trigger = allRequirements
override val projectSettings: Seq[Def.Setting[_]] = Seq(
packageBin in Compile <<= (packageBin in Compile).map { a =>
println("project/compile::packageBin")
a
}
)
}
But this does not work (at least not with SBT 0.13.5 and 0.13.6-M1), my version of packageBin
gets never called. If I put the the following line in my project's build.sbt
file, then it works.
packageBin in Compile <<= (packageBin in Compile).map { a => println("project/compile::packageBin"); a }
Is it possible at all to achieve this from an AutoPlugin or a classical plugin, and if so how?