sbt upgrade woes
note: I am running sbt 1.0.4 in this example
SBT v.1 upgrade issue #1
If you are running sbt version 1.x and encounter the following error while running any sbt command:
No Java Development Kit (JDK) installation was detected.
It may be because your shell profile has custom GREP_OPTIONS
which are preventing the sbt launcher from properly parsing your JDK version from a grep
command.
Here’s the source code which contains the grep command which was breaking things for me: github sbt code
Solution 1: disable GREP_OPTIONS
in your bash profile.
Solution 2: use Gradle instead
–
SBT v.1 upgrade issue #2
If you are running sbt version 1.x and encounter the following error while running any sbt job:
java.lang.OutOfMemoryError: Metaspace
You can increase the jvm memory allotment by passing the following flag while running any sbt command:
sbt -mem 2018
If you are using sbt on OSX installed via Homebrew you can also edit the following file to make the setting permanent:
/usr/local/etc/sbtopts
Just uncomment the following and add your new setting:
# set memory options
#
#-mem <integer>