Tell SBT to collect all my dependencies together
问题 When building a web application SBT is able to collect all my jar dependencies into the WAR file. Is this possible to have SBT put all the jars I depend on in my non-web application into a directory so I can easily put them onto my class path when running the app? 回答1: Yes, you can put something like this in your project definition class: val libraryJarPath = outputPath / "lib" def collectJarsTask = { val jars = mainDependencies.libraries +++ mainDependencies.scalaJars FileUtilities.copyFlat