开发者

Modifying watchpaths

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/buildfolder:

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")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜