You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to simple-b...@googlegroups.com
There are a lot of question how to run task inside other task. I found solution for tasks like compile, test and other such tasks. The only answer is to write custom before task and then use dependsOn. Sometimes this way is inappropriate.
Here is example how to overwrite sbt.Task[Unit] in build.sbt
test in MultiJvm <<= (test in MultiJvm) { (test) => val before: sbt.Task[Unit] = task { System.err.println("BEGIN") } val after: Unit => Unit = _ => System.err.println("END") before doFinally (test map after) }
If you start multi-jvm:test - sbt 1. Start before method. It initialize environment. 2. Start testand all dependent tasks (so they used prepared environment). 3. Start after method. It deinitialize environment.
It is very handy if you have few overwritten tasks in chain from different plugins and it isn't possible to pass your custom parameters via tasks chain.