Skip to content

Commit

Permalink
#57 include the mega-jar in the package (remove a lib/*.jars but incl…
Browse files Browse the repository at this point in the history
…ude the "fat" jar generated by sbt-assembly)
  • Loading branch information
tobyweston committed Apr 15, 2018
1 parent 2f83016 commit d66f94a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion package.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,17 @@ mappings in (Compile, packageSrc) := Seq()
// } filter {
// _.mappings.nonEmpty
// }
//}
//}

// remove all jar mappings in universal and append the "fat" jar
mappings in Universal := {
val universalMappings = (mappings in Universal).value
val fatJar = (assembly in Compile).value
val filtered = universalMappings filter {
case (_, name) => ! name.endsWith(".jar")
}
filtered :+ (fatJar -> ("lib/" + fatJar.getName))
}

// the bash scripts classpath only needs the fat jar
scriptClasspath := Seq((assemblyJarName in assembly).value)

0 comments on commit d66f94a

Please sign in to comment.