Tuesday 26 February 2019

SBT: package vs assembly

SBT Commands: package vs assembly

In this post, we will discuss about what is the major difference between 'package' and 'assembly' sbt commands.

sbt package:
SBT 'package' command creates a single JAR file containing all classes from our code base only. It uses other dependency libraries for complication purpose, but exclude them from final jar file. That means when we run that JAR file, it contains only our source code classes, but not other classes.

sbt assembly:
SBT 'assembly' command creates a single JAR file containing all classes from our source code and other dependency library's classes too. It uses other dependency libraries not only for complication purpose, but also uses for running that JAR File. that is it includes other dependency library's classes
in final jar file.


Many thanks

No comments:

Post a Comment