I am new to Play framework and sbt. According to http://www.scala-sbt.org/0.13/tutorial/Directories.html#Build+products tutorial, sbt is supposed to copy files from my public directory to my target directory. But after in compile, sbt is not doing so. Why is it?
compile
compiles scala/java sources, it doesn't touch your assets. Run assets
to compile/process your assets.
By the way, from the sound of your question it sounds like you might have a maven background. Maven defines lifecycle stages, and then plugins attach tasks to those stages, so after running the compile lifecycle stage, you expect all sorts of unrelated tasks to have run. This rather inflexible view of a build is not how sbt works, sbt is a task engine, so only tasks that the task you have run depends on will have run, and assets have nothing to do with compiling java/scala files, so they aren't touched. To get a better understanding of sbt, read https://jazzy.id.au/2015/03/03/sbt-task-engine.html