Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out which files have changed using Sbt

Tags:

watch

sbt

Sbt can re-run tasks when some of watched files have changed (~task). How to find out which files have changed?

like image 605
dk14 Avatar asked Oct 22 '22 03:10

dk14


1 Answers

You can add this to your build.sbt to see what files are watched:

watchSources ~= { files =>
  println(files.mkString("\n")+"\n\n\n")
  files//here you can add files or filter out
}

It might help you to test specific Test classes: ins sbt (interactice mode):

~test-only full.path.test.ClassName

To track file changes in general you can use Java 7 WatchService or Apache VFS for Java 6.

Source: WatchService for Java 6

like image 107
Schleichardt Avatar answered Dec 06 '22 19:12

Schleichardt