I'm new to the whole SBT and Scala scene, and I'm trying to create a project that uses the Java / Scala and Hibernate classes. I get a project to build perfectly - I just need to manually copy my hibernate configuration files to the target/scala<version>/classes
folder so that they can be taken from sleep mode.
Is there a way to create a task in SBT to copy these folders to each compiler? This is my Build.scala
file:
import sbt._ object Sportsbook extends Build { lazy val project = Project ( "sportsbook", file("."), copyConfigTask ) val copyConfig = TaskKey[Unit]("copy", "Copy hibernate files over to target directory") /* // Something like this lazy val copyConfigTask = copyConfig <<= val configDir1 = baseDirectory / "config" val configDir2 = outputPath / "config" IO.copyDirectory(configDir1, configDir2) */ }
source share