Is sbt.boot.properties used in sbt 0.10+?
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.
精彩评论