Embed launch script in fat-jar (#98)

* [sbt] enable executable jar for shell

* [sbt] rename assembled jar to not include file suffix
This commit is contained in:
Paul Campbell 2019-06-30 15:04:23 +01:00 committed by GitHub
parent 124c269322
commit 619424a416
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,13 +60,20 @@ lazy val thorp = (project in file("."))
.settings(commonSettings)
.aggregate(cli, `thorp-lib`, `storage-aws`, core, `storage-api`, domain)
import sbtassembly.AssemblyPlugin.defaultShellScript
lazy val cli = (project in file("cli"))
.settings(commonSettings)
.settings(mainClass in assembly := Some("net.kemitix.thorp.cli.Main"))
.settings(applicationSettings)
.settings(commandLineParsing)
.settings(testDependencies)
.settings(assemblyJarName in assembly := "thorp.jar")
.settings(Seq(
assemblyOption in assembly := (
assemblyOption in assembly).value
.copy(prependShellScript =
Some(defaultShellScript)),
assemblyJarName in assembly := "thorp"
))
.dependsOn(`thorp-lib`)
lazy val `thorp-lib` = (project in file("thorp-lib"))