I\'m new to sbt. I want it to put all the dependency jar
files as well as my jar file into one place. SBT will run the app, but I\'ve got various dependencies s
Create a task in your build file like this:
lazy val copyDependencies = TaskKey[Unit]("pack")
def copyDepTask = copyDependencies <<= (update, crossTarget, scalaVersion) map {
(updateReport, out, scalaVer) =>
updateReport.allFiles foreach {
srcPath =>
val destPath = out / "lib" / srcPath.getName
IO.copyFile(srcPath, destPath, preserveLastModified = true)
}
}
Add the Task to a Project like this:
lazy val HubSensors =
Project("HubSensors", file("HubSensors"), settings = shared ++ Seq(
copyDepTask,
resolvers ++= Seq(novusRels),
libraryDependencies ++= Seq(
jodatime
)
)) dependsOn(HubCameraVision, JamServiceProxy, HubDAL)
In the SBT console type:
project [Project Name]
pack