Dantavo
Dantavo

Reputation: 23

Create fat.jar + external file into a single tar.gz file to publish on my Nexus using Sbt-native-packager

I'm trying to create a single package which contains a fat.jar using sbt-assembly and After pack this with some external files present into my resources in a single file named .tar.gz, do you have some tips?

I tried Universal:packageZipTarball but I don't understand how specify the structure files I want to get. I have created the fat.jar yet but I'm still missing the next step.

Upvotes: 0

Views: 445

Answers (1)

Matthias Berndt
Matthias Berndt

Reputation: 4577

The contents of the package are controlled by the mappings task.

https://www.scala-sbt.org/sbt-native-packager/introduction.html#mappings

You need to customize that task in order for it to generate the structure you desire. There's a section in the manual that explains how to add a fat jar to the package: https://www.scala-sbt.org/sbt-native-packager/recipes/custom.html#sbt-assembly

Upvotes: 1

Related Questions