改变IDEA中SBT仓库为Aliyun的方法

    xiaoxiao2021-11-30  27

    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.

    转载请注明原文地址: https://ju.6miu.com/read-679168.html

    最新回复(0)