My project has dependency on an external jar. I have created a directory lib
and have copied the jar file into it. This is my build.sbt
:
First of all, there is no need to specify unmanagedJars
explicitly unless you have more complex configuration. Simply put your JAR files into the lib
directory and they will be added to the classpath (docs).
To package an executable JAR with all the necessary dependencies use one of the SBT plugins: sbt-onejar or sbt-assembly. package
simply packages your classes into a jar and doesn't bother with including dependencies whatsoever.
The instructions in the docs of the plugins should be easy to guide you how to use them.