简体   繁体   English

使用 Sbt-native-packager 将 fat.jar + 外部文件创建到单个 tar.gz 文件中以在我的 Nexus 上发布

[英]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.

相关问题 如何让sbt-native-packager避免将我的资源放入jar文件中? - How to make sbt-native-packager refrain from putting my resources into a jar file? 发布由 sbt-native-packager 创建的 zip - Publish zip created by sbt-native-packager 使用sbt-native-packager将外部conf文件夹用作资源文件夹 - Using external conf folder as resource folder with sbt-native-packager 如何使用 sbt-native-packager 在 Docker 中生成可执行的二进制文件? - How to make a binary file executable in Docker with sbt-native-packager? 使用sbt-native-packager和JDKPackager插件自定义Freedesktop文件 - Customise Freedesktop file with sbt-native-packager and JDKPackager plugin Sbt-Native-Packager控制文件与创建的.deb名称不一致 - Sbt-Native-Packager Control file inconsistent name to .deb created 如何使用 sbt-native-packager 更改通用 zip 文件名 - How do I change universal zip file name using sbt-native-packager 如何使用sbt-native-packager发布包含版本? - How to include version with sbt-native-packager publish? 如何从sbt-native-packager发布到Google容器引擎? - How to publish from sbt-native-packager to Google Container Engine? 如何使用sbt-native-packager将rpm发布到Artifactory托管的Yum存储库? - How to publish an rpm to an Artifactory-hosted Yum repository using sbt-native-packager?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM