.sbtconfig is deprecated

Jan Ziniewicz
1 min readSep 30, 2014

--

Most convenient way of setting JVM flags for SBT was to create a ~/.sbtconfig file. My file looked like this:

https://gist.github.com/whysoserious/80ad08ba5b8d0e11c05c

Starting from SBT 0.13.6 .sbtconfig file is deprecated. You probably could see this log message in a console when SBT starts:

Use of ~/.sbtconfig is deprecated, please migrate global settings to /usr/local/etc/sbtopts

Things became a bit more complicated now. There are a few solutions to this:

Create .sbtopts file in root of your SBT project

https://gist.github.com/whysoserious/5d6891935c4faeb7f889

Syntax is weird but that’s what we have to use now. Each -X flag has to be prefixed with -J. Debugger port has to be set with completely new flag. You can check what else has changed in sbt-launcher file.

Edit /usr/local/etc/sbtopts file

Take the above file and paste it at the bottom of /usr/local/etc/sbtopts. That’s it. This configuration will be used in all SBT projects.

Other options

Check this file: sbt-launcher. You will find a few more ways of configuring SBT.

--

--