For a project, I need to start SBT with specific JVM options (-Dfile.encoding=UTF-8
and a number of memory/gc options) - but I don't necessarily want to apply those same options to every SBT project I have.
I've seen references (in sbt-extras) to the .sbtopts
(project-specific SBT command line options) and .jvmopts
(project-specific SBT JVM options) files that are supposed to support this, if found in the root directory of an SBT project, but the standard Windows version of SBT (I'm using version 0.13.1) seems to ignore them.
(The sbt-extras approach appeals to me because, assuming that .sbtopts
and .jvmopts
are tracked in version control, there is zero SBT configuration required for people wishing to build the project.)
Is there a current mechanism to specify project-specific SBT options that works cross platform?
UPDATE: Since I originally raised this question, .sbtopts
and .jvmopts
are now part of the standard Linux version of SBT, and sbt-extras is no longer required. However, the Windows version only supports .jvmopts
and does not recognize .sbtopts
.
This is a recognized limitation with the current version of SBT (v1.0.3, at the time of writing) on Windows (it doesn't recognize .sbtopts
in the project's root directory). All versions now support the .jvmopts
file.
You can track the status of this issue on sbt-launcher-package's _GitHub issue tracker.
UPDATE: This issue was fixed in Oct. 2019. Thanks to @conny for pointing that out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With