sbt-native-packager - 是否有与 sbt-pack packMain 等效的 sbt-native-packager 选项?
问题描述
我有一个包含几个主要类的 scala 应用程序库。运行时sbt stage
,sbt 正确地为我拥有的每个主类创建 bash 脚本,但具有预定义的名称(取自每个类名)。我想控制 bash 脚本的名称和传递给每个脚本的 JVM opts。
例如:给定两个主要类:FooBar 和 BarFoo,我分别得到 bin/foo-bar 和 bin/bar-foo。
我想以某种方式传递一张地图
mainClasses := Map(
"newFooBar" -> "com.example.FooBar",
"newBarFoo" -> "com.example.BarFoo"
)
mainClassesJVM := Map(
"newFooBar" -> "-Xmx512m",
"newBarFoo" -> "-Xmx2g"
)
I found an sbt plugin called sbt-pack that does what I'm trying to achieve but I was wondering if I could achieve the same only with the sbt-native-packager plugin.
Example using sbt-pack plugin:
// [Optional] Specify mappings from program name -> Main class (full package path). If no value is set, it will find main classes
automatically
packMain := Map(
"newFooBar" -> "com.example.FooBar",
"newBarFoo" -> "com.example.BarFoo"
)
// [Optional] JVM options of scripts (program name -> Seq(JVM
option, ...))
packJvmOpts := Map(
"newFooBar" -> "-Xmx512m",
"newBarFoo" -> "-Xmx2g"
)
Does anyone know if there is an option to achieve the above using only sbt-native-packager?
解决方案
推荐阅读
- java - 未经检查地调用“continueWithTask....”作为原始类型的成员
- javascript - 如何使输入再次可编辑?
- python - 无服务器框架 - Python 和 Requirements.txt - 删除不必要的包
- google-play - Google play 取消购买
- c# - 我需要帮助以在统一 2d 中生成敌人
- python - 如何让我的 PyTorch DCGAN 代码在 GPU 上运行?
- java - Android如何启动动画系列
- angular - 为什么 ngStyle 背景图像没有加载?
- reactjs - 重置 Radio.Group 值 onSubmit click for antd library
- angular - 我无法将openproject部署到heroku