Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is sbt.boot.properties used in sbt 0.10+?

Tags:

scala

sbt

pre-sbt 0.10.0 used an sbt.boot.properties to define sbt's boot configuration file.

What is the sbt 0.10.0 "way" of defining boot properties?

I am looking for the equivalent of sbt.boot.properties (not build.properties) that's activated by -Dsbt.boot.properties=...

like image 665
S-C Avatar asked Jul 21 '11 18:07

S-C


1 Answers

sbt.boot.properties exists in 0.10 (up to and including 0.13.1 that's the latest version of sbt at the moment) and is essentially the same as before.

The main addition is that the default sbt.boot.properties is set up to allow a few properties to be defined by system properties. This can avoid the need to use a custom sbt.boot.properties in some common cases.

The two main properties configurable in this way are defined by the following sections of the default file:

[boot]
  directory: ${sbt.boot.directory-project/boot/}

[ivy]
  ivy-home: ${sbt.ivy.home-${user.home}/.ivy2/}

The syntax for variables is bash-like: ${system.property.name-default}. This means that you can set the boot directory with something like:

$ sbt -Dsbt.boot.directory=/home/user/.sbt/boot/

If unspecified, it would default to project/boot/ as usual. Similarly, you can set the Ivy home directory with:

$ sbt -Dsbt.ivy.home=/home/user/.sbt/.ivy2/

If unspecified, it defaults to the usual .ivy2 subdirectory in the directory defined by the user.home system property.

like image 102
Mark Harrah Avatar answered Nov 02 '22 22:11

Mark Harrah