打包时使用SBT-本机打包插件SBT一个命令行应用程序,你有看起来像这种额外的命令行选项的包装脚本。命令行选项
-h | -help print this message
-v | -verbose this runner is chattier
-d | -debug set sbt log level to debug
-no-version-check Don't run the java version check.
-mem <integer> set memory options in MB (default: , which is -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=128m)
-jvm-debug <port> Turn on JVM debugging, open at the given port.
# java version (default: java from PATH, currently java version "1.7.0_21")
-java-home <path> alternate JAVA_HOME
# jvm options and output control
JAVA_OPTS environment variable, if unset uses ""
-Dkey=val pass -Dkey=val directly to the java runtime
-J-X pass option -X directly to the java runtime
(-J is stripped)
# special option
-- To stop parsing built-in commands from the rest of the command-line.
e.g.) enabling debug and sending -d as app argument
$ ./start-script -d -- -d
是否有可能有选择地禁用某些选项或将它们从打包的应用程序中全部删除?
通过所有内容也许您正在寻找一种方法来自定义脚本模板:http://www.scala-sbt.org/sbt-native-packager/archetypes/java_app/customize。 html#start-script-customizations – Shyam
谢谢@shyam我会看看这个选项。 –