[英]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?我正在尝试使用 sbt-assembly 创建一个包含 fat.jar 的单个 package,然后将其与一些外部文件打包到我的资源中的一个名为.tar.gz 的单个文件中,你有什么提示吗?
I tried Universal:packageZipTarball but I don't understand how specify the structure files I want to get.我尝试了 Universal:packageZipTarball 但我不明白如何指定我想要获取的结构文件。 I have created the fat.jar yet but I'm still missing the next step.
我已经创建了 fat.jar 但我仍然错过了下一步。
The contents of the package are controlled by the mappings
task. package 的内容由
mappings
任务控制。
https://www.scala-sbt.org/sbt-native-packager/introduction.html#mappings 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
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.