. The activator is never created in the user folder and always created in the% USERPROFILE% folder.
I understand that ~/.activator controlled by running a script where you must point to a user directory.
For ~/.sbt you really should use the sbt.global.base property, as I see it is used in the sbt code itself.
If you want to see under the hood, you can query the current home directory values for sbt and Ivy using the consoleProject (assuming you started the activator with activator -Dsbt.global.base=./sbt -Dsbt.ivy.home=./ivy2 ):
> consoleProject [info] Starting scala interpreter... [info] import sbt._ import Keys._ import _root_.sbt.plugins.IvyPlugin import _root_.sbt.plugins.JvmPlugin import _root_.sbt.plugins.CorePlugin import _root_.sbt.plugins.JUnitXmlReportPlugin import currentState._ import extracted._ import cpHelpers._ Welcome to Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_60). Type in expressions to have them evaluated. Type :help for more information. scala> appConfiguration.eval.provider.scalaProvider.launcher.bootDirectory res0: java.io.File = /Users/jacek/sandbox/sbt-launcher/minimal-scala/sbt/boot scala> appConfiguration.eval.provider.scalaProvider.launcher.ivyHome res1: java.io.File = /Users/jacek/.ivy2
Iff, you really convince Activator to use sbt.ivy.home , you need to change sbt/sbt.boot.properties to activator-launch-1.2.2.jar . Just follow these steps:
Unzip sbt/sbt.boot.properties from activator-launch-1.2.2.jar .
jar -xvf activator-launch-1.2.2.jar sbt/sbt.boot.properties
Change sbt/sbt.boot.properties and replace ivy-home with [ivy] .
ivy-home: ${sbt.ivy.home-${user.home}/.ivy2}
Add the modified sbt/sbt.boot.properties to activator-launch-1.2.2.jar .
jar -uvf activator-launch-1.2.2.jar sbt/sbt.boot.properties
When changed, -Dsbt.ivy.home=./ivy2 works fine.
scala> appConfiguration.eval.provider.scalaProvider.launcher.bootDirectory res0: java.io.File = /Users/jacek/sandbox/sbt-launcher/minimal-scala/sbt/boot scala> appConfiguration.eval.provider.scalaProvider.launcher.ivyHome res1: java.io.File = /Users/jacek/sandbox/sbt-launcher/minimal-scala/ivy2
Jacek laskowski
source share