SBT has triggered execution so if I execute a command like
~test
It executes all test cases and then waits for source changes. I want to extend this behavior to get triggered execution whenever input files are changed. All input files exist in a single folder. To achieve this I created a scala file in project/build
folder:
import sbt._
class ExtendedProject(info: ProjectInfo) extends DefaultProject(info)
{
override def watchPaths = (mainSources +++ testSources +++ mainResources
+++ testResources) \ "d:\\...path to folder"
}
but when I execute the test command nothing happens! Invoking ~test
waits for sometime and then exits without any output.
Is this because SBT expects all other settings to be overridden too? Is there a way to specify watchPaths in build.properties file?
try this one:
override def watchPaths = mainSources +++ testSources +++ mainResources +++ testResources +++ Path.fromFile("/path/to/your/dir")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With