Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make -Dsbt.override.build.repos=true global for SBT?

Tags:

scala

sbt

I want to override all repos even the ones introduced inadvertently in my build.sbt files so we can point to our proxy and have a common binary base for all the team. The option

$ sbt -Dsbt.override.build.repos=true

does the job but I'd like to make this option permanent. I've been looking at http://www.scala-sbt.org/release/docs/Global-Settings.html but I don't know how to translate that option to the global.sbt file they mention.

How would you configure that option globally?

like image 440
tonicebrian Avatar asked Apr 21 '15 18:04

tonicebrian


People also ask

How do I specify sbt?

Create or open your sbt project. In the Project tool window, in the source root directory, locate the build. properties file and open it in the editor. In the editor explicitly specify the version of sbt that you want to use in the project.

What is ThisBuild in sbt?

Typically, if a key has no associated value in a more-specific scope, sbt will try to get a value from a more general scope, such as the ThisBuild scope. This feature allows you to set a value once in a more general scope, allowing multiple more-specific scopes to inherit the value.

Does sbt use coursier?

Coursier is an artifact fetching tool written in Scala. Coursier has been used by SBT for fetching the library dependencies since 1.3. 0.


1 Answers

Add -Dsbt.override.build.repos=true to the SBT_OPTS environment variable

like image 198
ffxtian Avatar answered Nov 15 '22 04:11

ffxtian