Change of watches

SBT starts 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 a run every time the input files change. All input files exist in one folder. To do this, I created a scala file in the folder project/build:

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! The call ~testwaits for a while, and then leaves without output.

Is this because SBT expects all other settings to be overridden? Is there a way to specify watchPaths in the build.properties file?

+5
source share
1 answer

try the following:

override def watchPaths = mainSources +++ testSources +++ mainResources +++ testResources +++ Path.fromFile("/path/to/your/dir")
+2
source

All Articles