You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the sbt package command, it creates a jar file but this jar will be without any dependencies which it can not run.
To run it necessary to specify classpath arg to the libraries.
Wish:
Maybe we wish a standalone runnable jar file.
So we need to add the dependencies. To do this we can use assembly plugin for sbt, please see sbt-assembly, what it will do is create one jar file containing the project class files along with all of its dependencies. If we write an application, what we get is a double-clickable jar that we can execute from anywhere.
Solved:
Afterward we can just run the sbt assembly command, it provides a fat jar file with all dependencies that you can deploy and run anywhere and at any time.
The text was updated successfully, but these errors were encountered:
Background:
Using the
sbt package
command, it creates a jar file but this jar will be without any dependencies which it can not run.To run it necessary to specify
classpath
arg to the libraries.Wish:
Maybe we wish a standalone runnable jar file.
So we need to add the dependencies. To do this we can use
assembly
plugin forsbt
, please see sbt-assembly, what it will do is create one jar file containing the project class files along with all of its dependencies. If we write an application, what we get is a double-clickable jar that we can execute from anywhere.Solved:
Afterward we can just run the
sbt assembly
command, it provides a fat jar file with all dependencies that you can deploy and run anywhere and at any time.The text was updated successfully, but these errors were encountered: