questionersam
questionersam

Reputation: 1125

sbt system level global .sbt file

I know I can have my global settings under ~/.sbt . Is there a system level location where I can put global .sbt files for all users? Essentially, Im planning to put generally useful plugin configurations etc in the file

Upvotes: 3

Views: 599

Answers (3)

Saby
Saby

Reputation: 129

a better way to do this is:
1. write an autoplugin with autoImport and triggers as allDependencies(and don't have your plugin to depend on any other plugin)
2. publish your plugin to a repo(of your organization)....or publish is locally if all the users are using a shared machine
3. include the plugin in whatever project it's needed

Upvotes: -1

RandomCoder
RandomCoder

Reputation: 1

Although I have not found a way to do this either with sbt directly, you could try adding your default settings as symbolic links in /etc/skel/.sbt/plugins and store the actual default settings in (for example) /etc/sbt/settings/global.sbt.

Create a symbolic link to each file in /etc/sbt/settings/ to /etc/skel/.sbt/plugins and any new users will automatically get the global settings and any changes will be automatically propagated as well.

You will have to manually add the links to existing users though (unless there is a means of updating a user's home from the skeleton after their creation?)

Upvotes: 0

ad0
ad0

Reputation: 21

I don't know about such a feature in sbt. What about symbolic links ?

Upvotes: 2

Related Questions