Skip to content

Instantly share code, notes, and snippets.

@gseitz
Created July 22, 2011 19:01
Show Gist options
  • Save gseitz/1100138 to your computer and use it in GitHub Desktop.
Save gseitz/1100138 to your computer and use it in GitHub Desktop.
Separate global plugins/settings folder per sbt version
## Note: the system property `sbt.global.base` was introduced in 0.10.1
## sbt-0.10.0 still uses the default global directory in ~/.sbt
gseitz@QBallz ~/.sbt % find . -name '*target*' -prune -o -print
.
./0.10.1
./0.10.1/plugins
./0.10.1/plugins/build.sbt
./0.10.1/plugins/project
gseitz@QBallz ~/dev/projects/sbt-protobuf (0.0.6) % /usr/local/Cellar/sbt/0.10.0/bin/sbt; # LOOK MA, no global plugins loaded
[info] Set current project to default (in build file:/Users/gseitz/dev/projects/sbt-protobuf/)
>
gseitz@QBallz ~ % cat `which sbt`
#!/bin/sh
test -f ~/.sbtconfig && . ~/.sbtconfig
exec java -Xmx512M ${SBT_OPTS} -Dsbt.global.base="$HOME/.sbt/0.10.1" -jar /usr/local/Cellar/sbt/0.10.1/libexec/sbt-launch.jar "$@"
gseitz@QBallz ~/dev/projects/sbt-protobuf (0.0.6) % sbt; # vvvvvv
[info] Set current project to default-270814 (in build file:/Users/gseitz/.sbt/0.10.1/plugins/)
[info] Set current project to default-47fcc8 (in build file:/Users/gseitz/dev/projects/sbt-protobuf/)
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment