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=...
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.
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