1. 程式人生 > >改變IDEA中SBT倉庫為Aliyun的方法

改變IDEA中SBT倉庫為Aliyun的方法

Launcher Script

The sbt launcher supports two configuration options that allow the usage of proxy repositories. The first is the sbt.override.build.repos setting and the second is the sbt.repository.config setting.

sbt.override.build.repos

This setting is used to specify that all sbt project added resolvers should be ignored in favor of those configured in the repositories

 configuration. Using this with a properly configured~/.sbt/repositories file leads to only your proxy repository used for builds.

It is specified like so:

-Dsbt.override.build.repos=true

The value defaults to false and must be explicitly enabled.

sbt.repository.config

If you are unable to create a ~/.sbt/repositories

 file, due to user permission errors or for convenience of developers, you can modify the sbt start script directly with the following:

-Dsbt.repository.config=<path-to-your-repo-file>

This is only necessary if users do not already have their own default repository file.