Skip to content

Instantly share code, notes, and snippets.

@BowlingX
Created November 21, 2012 15:06
Show Gist options
  • Save BowlingX/4125301 to your computer and use it in GitHub Desktop.
Save BowlingX/4125301 to your computer and use it in GitHub Desktop.
assembly.sbt
import AssemblyKeys._
// apply Assembly settings
assemblySettings
// Set Main Class to run after (jar -jar yourJarFile)
mainClass in assembly := Some("com.yourcompany.FrontendLauncher")
// optional: No Test run in assemble
test in assembly := {}
// Copy webapp Resources to resource directory (needed for embedded jetty)
resourceGenerators in Compile <+= (resourceManaged, baseDirectory) map {
(managedBase, base) =>
val webappBase = base / "src" / "main" / "webapp"
for {
(from, to) <- webappBase ** "*" x rebase(webappBase, managedBase /
"main" / "webapp")
} yield {
Sync.copy(from, to)
to
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment