How to package a Scala project to a .jar file with sbt? Manually packaging the .class files are fine but too tedious.
A jar of just the project classes
will produces the main artifact as a jar into
Continuously building the package:
Standalone jar with all dependencies
If you want to build a standalone executable jar with dependencies, you may use the sbt-assembly plugin. And then build it by
The standalone will be in target/project_name-assembly-x.y.jar.
You can run it by
java -jar project_name-assembly-x.y.jar [class.with.main.function]