Benjamin
Benjamin

Reputation: 3477

sbt: how to merge multiple jars

Is there a way to use sbt to just merge (assembly) multiple jars in one jar.

Let say I have:

and I want:

Maybe there are some other tools to make that for example using zip to aggregate archives but I think sbt does some useful checks during assembly.

Upvotes: 2

Views: 503

Answers (1)

Ben McNiel
Ben McNiel

Reputation: 8801

SBT has an assembly plugin:

https://github.com/sbt/sbt-assembly

You should be able to add your static lib/ jars as dependencies then the assembly plugin can wrap it all up into one jar.

Upvotes: 2

Related Questions