Why and how to install sbt and Ivy source and cache directories?

I wanted to learn how to install the sbt and Ivy cache directories.

I found some conflicting answers online that I wanted to check here.

sbt -Dsbt.boot.directory=/home/user/.sbt/boot/
sbt -Dsbt.ivy.home=/home/user/.sbt/.ivy2/

      

Can they be installed as vars environments or should they be in everyone build.sbt

?

If they are the environment, will they be sbt.boot.directory

and sbt.ivy.home

?

Is it better to set them in each one build.sbt

and possibly also as environment variables?

+3


source to share


1 answer


You don't need to install them as sbt launcher will already know their meanings.

If you want to change them, they must become part of the command line in order to launch the sbt launcher - they are Java system properties and set like other Java properties. They don't build customizations.



There is nothing special about setting Java system properties here - just think of sbt as a Java application that usually reads system properties and defaults if they are not.

If you're new to sbt, you'd be better off forgetting about Java system properties for now. You just need to remember that the global config directory is sbt ~/.sbt

, and ~/.ivy2/

is for Ivy stuff. This is enough to go with sbt.

+1


source







All Articles