September 2018
Intermediate to advanced
398 pages
9h 43m
English
So far so good, but what if we want to send this application to uncle Bob so that he can plan for his retirement too? It would not be very convenient to ask him to download IntelliJ or SBT. We are going to package our application in a .jar file so that we can run it with a single command.
SBT provides a package task that can create a .jar file, but this file will not contain the dependencies. In order to package our own classes as well as the classes coming from the dependent libraries, we are going to use the sbt-assembly plugin. Create a new file called project/assembly.sbt containing the following:
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")
Then, edit build.sbt to define the name of our main class: ...
Read now
Unlock full access