4

I think that by now I figured out how to force project dependencies to be downloaded through Nexus. (I did that by explicitly setting externalResolvers to a Seq with only one value:

override lazy val settings = super.settings ++ Seq(
  externalResolvers := Seq("Nexus repository" at "http://.../nexus/content/groups/public/")
)

However, if I drop my Ivy cache, SBT still accesses a number of public repositories for getting the plugins. Ideally I would like that to go through Nexus as well, to make sure we are not dependent on those repositories to exist forever. (Which they don't.)

Any clues? (I'm on SBT 0.11.2)

Wilfred Springer
  • 10,869
  • 4
  • 55
  • 69

1 Answers1

1

sbt 0.12 added Global repository setting for this purpose.

Define the repositories to use by putting a standalone [repositories] section (see the Launcher Specification page) in ~/.sbt/repositories and pass -Dsbt.override.build.repos=true to sbt. Only the repositories in that file will be used by the launcher for retrieving sbt and Scala and by sbt when retrieving project dependencies.

Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319