I am using sbtassembly from https://github.com/sbt/sbt-assembly with this merge strategy:
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case PathList("javax", "servlet", xs @ _*) => MergeStrategy.first
case PathList(ps @ _*) if ps.last endsWith ".html" => MergeStrategy.first
case "application.conf" => MergeStrategy.concat
case "unwanted.txt" => MergeStrategy.discard
case x => old(x)
}
}
For some reason my static content is not being included in the executable jar, but my webservices work fine (so it does work).
How can I include my index.html and javascript files?
There's a related question Why sbt compile doesn't copy unmanaged resources to classpath? that you can get an idea for the setting.
Here's the setting using sbt 0.13:
unmanagedResourceDirectories in Compile += { baseDirectory.value / "src/main/webapp" }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With